Documentation

Regex.Regex

Regex #

Main api for Regex

Equations
  • c.end? = some c.fullMatch.val.stopPos
Instances For
    Equations
    • c.matches = #[some c.fullMatch] ++ c.groups
    Instances For
      Equations

      Build a Regex from the given pattern.

      Equations
      Instances For
        def Regex.Log.captures (s : ValidSubstring) (re : Regex) («at» : ValidPos s.val.str) (logEnabled : Bool) :

        This routine searches for the first match of this regex in the haystack given, returns an array of log msgs, the overall match and the matches of each capture group

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Regex.Log.all_captures (s : ValidSubstring) (re : Regex) (logEnabled : Bool) :

          Returns an array of log msgs and all successive non-overlapping matches in the given haystack.

          Equations
          Instances For
            def Regex.captures (s : ValidSubstring) (re : Regex) («at» : ValidPos s.val.str := default) :
            Option (Captures s.val.str)

            This routine searches for the first match of this regex in the haystack given, and if found, returns not only the overall match but also the matches of each capture group in the regex. If no match is found, then None is returned.

            Equations
            Instances For
              def Regex.all_captures (s : ValidSubstring) (re : Regex) :
              Array (Captures s.val.str)

              Returns all successive non-overlapping matches in the given haystack.

              Equations
              Instances For