Skip to content

Dot '.' is not recognized with regular expressions #1

@Zenopheus

Description

@Zenopheus

If I query all game objects under a parent called "Foo" using:
var xxx = root.SelectAll("Foo/?.*");
I get this exception:
System.ApplicationException: Expected token: Name, but encountered token Dot (.)

It looks like '.' is being confused for a layer token. I hacked it to work by changing the layer token from '.' to '^'. It now works (until I need to use ^ in a regex). The code should probably not be looking for tokens once it encounters a '?'.

The code changes I made (not a solution):

QueryTokens.Dot --> QueryTokens.Caret
if (query[position] == '^')
{
  Token = QueryTokens.Caret;
  TokenString = "^";
  ++position;
  return;
}

By the way:
This one of my favorite assets. People have no idea how powerful something like this can be. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions