Regex represents a regular expression.
Slots
- equalsSource
-
override Bool equals(Obj? obj)Overrides sys::Obj.equals
Equality is based on pattern string.
- fromStrSource
-
new fromStr(Str pattern)Compile a regular expression pattern string.
- hashSource
-
override Int hash()Overrides sys::Obj.hash
Return
toStr.hash. -
new make()Private constructor.
- matcherSource
-
RegexMatcher matcher(Str s)Return a
RegexMatcherinstance to use for matching operations against the specified string. - matchesSource
-
Convenience for
matcher(s).matches. - splitSource
-
Str[] split(Str s, Int limit := 0)Split the specified string around matches of this pattern. The
limitparameter specifies how many times to apply the pattern:- If
limitis greater than zero, the pattern is applied at mostlimit-1times and any remaining input will be returned as the list's last item. - If
limitis less than zero, then the pattern is matched as many times as possible. - If
limitis zero, then the pattern is matched as many times as possible, but trailing empty strings are discarded.
- If
- toStrSource
-
override Str toStr()Overrides sys::Obj.toStr
Return the regular expression pattern string.