Skip to content

Support only tag pattern formats X OR Y and xORy, not XORY #5656

Description

@pekkaklarck

When matching tags, Robot supports Boolean operators AND, OR and NOT. These operators are case-sensitive, but they are currently searched anywhere from a tag pattern so something like FORCE is interpreted as F OR CE. The general recommendation has been using lower case names like force in tag patterns, but not everyone knows this. This behavior most often causes issues with command line options like --include, but #5579 demonstrates that also the -tag syntax in the data is affected.

Handling tags like FORCE, HAND, PORT, KNOT as Boolean expressions makes no real sense, and we have decided to change pattern matching so that all these are considered literal patterns. Boolean operators will still be supported, but they either need to be surrounded by spaces like X OR Y or tag names need to be lower case like xORy. The latter format is mostly supported for backwards compatibility reasons, but it also allows using patterns on the command line without quoting like --include xORy.

This change is backwards incompatible and we don't want to do it in a feature release like RF 7.5. The change is considered rather important and backwards compatibility issues aren't considered too severe, though, so changing the behavior in a major release like RF 8.0 ought to be fine. Delaying the change a little also makes it possible to properly deprecate the XORY format in RF 7.5 (#5657).

Activity

  1. added this to the v8.0 milestone on Apr 23, 2026
  2. changed the title [-]Support only tag pattern formats "X OR Y" and "xORy", not "XORY"[/-] [+]Support only tag pattern formats `X OR Y` and `xORy`, not `XORY`[/+] on Apr 23, 2026
  3. sudheerr937-ai commented on Apr 27, 2026

    @sudheerr937-ai
    Contributor

    Hi @pekkaklarck

    I'd like to work on this issue. I've reviewed the issue description and understand that the fix involves updating the tag pattern tokenizer to only recognize Boolean operators (AND, OR, NOT) when they are surrounded by spaces like X OR Y or when tag names are entirely lowercase like xORy. The XORY style patterns should no longer be supported in RF 8.0. Could you please assign this issue to me?

  4. pekkaklarck commented on Apr 28, 2026

    @pekkaklarck
    MemberAuthor

    Thanks for interest @sudheerr937-ai, but I don't think it makes sense to look at this issue now. Due to backwards compatibility reasons we decided to wait until RF 8.0 until this is released. A PR could obviously be done already now, but there's too big risk for there to me changes causing conflicts before it could be merged that I don't think it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions