Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upruntime exception in Regex.regex #912
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Oct 2, 2017
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Oct 2, 2017
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
dave-doty
commented
Oct 2, 2017
|
Sorry, I just noticed that this will be fixed in Elm 0.19: |
dave-doty
closed this
Oct 2, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Yep, looking forward to that :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dave-doty commentedOct 2, 2017
The function
regex : String -> Regexcreates a ElmRegexfrom aString. If given an invalidly formatted regex string, for example,"0)", it throws a runtime exception.Perhaps this is expected behavior, since
regexreturns aRegexinstead of aResult _ Regex? So perhaps this is a feature request to alter the return type to returnErr _if the input has bad syntax, or at least give some way to test whether aStringis a valid Javascript regular expression before calling theregexfunction.