Std.Regex
18 public declarations
- capture
&Std.Regex.Match -> Int -> Option[Str]One group of a match, by number. Group 0 is the whole match.
- compile
Str -> Result[Std.Regex.Regex, Std.Regex.RegexError]Compile a pattern, or say where it stopped making sense.
- escape
Str -> StrText quoted so a pattern matches it exactly.
- explain
&Std.Regex.RegexError -> StrWhy a pattern was refused, written for a person to read.
- find
&Std.Regex.Regex -> Str -> Option[Std.Regex.Match]Where the pattern first matches, or nothing.
- findAll
&Std.Regex.Regex -> Str -> Array[Std.Regex.Match]Every match, left to right, without overlapping.
- isExact
&Std.Regex.Regex -> Str -> BoolWhether the pattern matches the whole subject, and nothing less.
- isMatch
&Std.Regex.Regex -> Str -> BoolWhether the pattern matches anywhere in the subject.
- Match
Where a pattern matched, and what its groups captured.
- Regex
A compiled pattern.
- RegexError
Why a pattern could not be compiled, or a search could not finish.
- replaceAll
&Std.Regex.Regex -> Str -> Str -> StrEvery match replaced by fixed text.
- replaceAllWith
&Std.Regex.Regex -> Str -> fn(Std.Regex.Match) -> Str -> StrEvery match replaced by what a function makes of it.
- replaceFirst
&Std.Regex.Regex -> Str -> Str -> StrThe first match replaced by fixed text.
- search
&Std.Regex.Regex -> Str -> Result[Option[Std.Regex.Match], Std.Regex.RegexError]Search from each position in turn, reporting a search that gave up.
- split
&Std.Regex.Regex -> Str -> Array[Str]The subject cut at every match.
- stepLimit
IntHow many instructions one search may run before it gives up.
- unmatchable
Std.Regex.RegexA pattern that matches nothing.
