Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Zenopheus opened this issue Mar 5, 2017 · 0 comments
Open

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

Zenopheus opened this issue Mar 5, 2017 · 0 comments

Comments

@Zenopheus
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant