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

Optional vs Required with Regex #58

Closed
kfezer opened this issue May 25, 2017 · 3 comments
Closed

Optional vs Required with Regex #58

kfezer opened this issue May 25, 2017 · 3 comments

Comments

@kfezer
Copy link

kfezer commented May 25, 2017

It seems that with working with Regex optional is the way to successfully register where required fails to register intents.

@forslund
Copy link
Collaborator

I don't think it's as straightforward as described above. It works mostly. But if another regex is added that has a certain content it starts to fail. See https://gist.github.com/forslund/e077b749278de3476ef121b81277d689 for an example. Here the Location won't be found by adapt when the second regex is added.

The second regex will catch EVERYTHING but it's still weird that it will reduce the score of the Location regex.

@clusterfudge
Copy link
Collaborator

Thanks for the guidance here, @forslund. Closing as answered.

@clusterfudge
Copy link
Collaborator

hey @kfezer , as an FYI I'm finally tackling this as with #137

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

3 participants