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

regex matches function seems to be using \ as a delmiter #7

Open
brianpos opened this issue Aug 21, 2016 · 1 comment
Open

regex matches function seems to be using \ as a delmiter #7

brianpos opened this issue Aug 21, 2016 · 1 comment

Comments

@brianpos
Copy link
Contributor

The spec doesn't indicate that there should be any delimiting of string expressions, so the below expression should work, however it is requiring the \ characters to be delimited.

'^(?(")(".+?(?<!\\)"@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$'

so if you replace all the \ with a \ this expression does work, but think isn't wanted/needed.

@ewoutkramer
Copy link
Owner

Hi Brian, I don't really get what's wrong? The normal escaping rules for strings in FluentPath say that you should escape the \ (with a double ) to get them across to the regex? We don't have an equivalent of say "@" in .NET in FP...

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

2 participants