Skip to content

Wildcard with exceptions #99

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

Closed
Dadibom opened this issue Feb 17, 2017 · 5 comments
Closed

Wildcard with exceptions #99

Dadibom opened this issue Feb 17, 2017 · 5 comments

Comments

@Dadibom
Copy link

Dadibom commented Feb 17, 2017

Hey! I'd love a way to use negative lookahead regexes in my paths, for example *(?!foo) to match everything but 'foo'.

However, this does not work. Output:
'Uncaught SyntaxError: Invalid regular expression: /^/:((?:?!foo))(?:/(?=$))?$/: Nothing to repeat'

Maybe there's already a way to do this that I don't know of?

@blakeembrey
Copy link
Member

No, this isn't possible. Try using a RegExp instead.

@Dadibom
Copy link
Author

Dadibom commented Feb 17, 2017

Unfortunately it's not up to me as i'm using this through vue-router :(

@blakeembrey
Copy link
Member

This library accepts regular expressions, if they are just passed through it should be fine.

@posva
Copy link

posva commented Feb 18, 2017

@blakeembrey You can safely close this 🙂
If there's anything to do, it's on our (vue-router) end

@Dadibom
Copy link
Author

Dadibom commented Feb 18, 2017

Thank you for clarifying :)

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