Documentation

Regex.Regex

structure Regex :

A compiled regular expression for searching Unicode haystacks.

Instances For
    Equations

    Regex #

    Main api for Regex

    @[reducible, inline]

    Represents a single match of a regex in a haystack.

    Equations
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      structure Regex.Captures :

      Represents the capture groups for a single match.

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

            Build a Regex from the given pattern.

            Equations
            Instances For

              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
                theorem Regex.Log.String.Pos.lt_def {a : String.Pos} {b : String.Pos} :
                a < b a.byteIdx < b.byteIdx
                theorem Regex.Log.String.Pos.sub_lt_sub_left {k : String.Pos} {m : String.Pos} {n : String.Pos} (h1 : k < m) (h2 : k < n) :
                m - n < m - k

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

                Equations
                Instances For
                  def Regex.captures (s : Substring) (re : Regex) (at : optParam String.Pos { byteIdx := 0 }) :

                  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

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

                    Equations
                    Instances For