Details
-
Type:
Enhancement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Have a second optional argument to re-pattern that accepts modifier flags for the RegExp, being one or more of "i" "g" or "m". Otherwise it is impossible to programmatically construct modified regexes without using js/RegExp directly.
e.g.
> #"(?i)foo"
#</foo/i>
but
> (re-pattern "(?i)foo")
"Error evaluating:" (re-pattern "(?i)foo") :as "cljs.core.re_pattern.call(null,\"(?i)foo\");\n"
#<SyntaxError: Invalid regular expression: /(?i)foo/: Invalid group>