Regex operations for FormattedText
{ match : FormattedText.Internal.FormattedText markup
, index : Basics.Int
, number : Basics.Int
}
A match in a piece of FormattedText
This is the equivalent for FormattedTexts of Regex.Match
for Strings.
Unfortunately submatches cannot currently be supported when matching formatted texts.
contains : Regex -> FormattedText.Internal.FormattedText markup -> Basics.Bool
Check if a FormattedText contains matches with a regex.
This is the equivalent of Regex.contains
.
find : Regex -> FormattedText.Internal.FormattedText markup -> List (Match markup)
Find regex matches in a FormattedText.
This is the equivalent of Regex.find
.
replace : Regex -> (Match markup -> FormattedText.Internal.FormattedText markup) -> FormattedText.Internal.FormattedText markup -> FormattedText.Internal.FormattedText markup
Replace regex matches in a FormattedText.
This is the equivalent of Regex.replace
.
split : Regex -> FormattedText.Internal.FormattedText markup -> List (FormattedText.Internal.FormattedText markup)
Split a FormattedText on matches with a regex.
This is the equivalent of Regex.split
.