Add regex built-ins
mathcat4 opened this issue · comments
mathcat commented
eg. first match, all matches, return groups, ...
lyxal commented
Regex features (stolen from python's re
library):
Search => return first index ofpattern
matchMatch => return the portion of thestring
thatpattern
matchesMatches at all => return a boolean whether a match is presentMatches Fully => return whether the entire string matches the patternSplit => Split a string on apattern
Find All => find all non-overlapping matches ofpattern
in stringFind All overlapping => Find all but more painful to implementSubstitute => Replace instances of pattern with string/function taking match as inputEscape => Take a string and escape itGroups => Return a list of all groups of a matchSpan => Return the start and end position of a match
Strikethrough represents implemented.