Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects versions: None
    • Fix versions: 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>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: