Name
String::CutRegexMatch —
Remove first or every match of given regular expression from a string
Synopsis
Import String;
string
String::CutRegexMatch
( |
string
| input
, |
|
string
| regex
, |
|
boolean
| glob
) ; |
Parameters
-
string
input
string that might occur regex
-
string
regex
regular expression to search for, must not contain brackets
-
boolean
glob
flag if only first or every occuring match should be removed
Return Value
-
string
that has matches removed
Description
(e.g. CutRegexMatch( "abcdef12ef34gh000", "[0-9]+", true ) -> "abcdefefgh",
CutRegexMatch( "abcdef12ef34gh000", "[0-9]+", false ) -> "abcdefef34gh000")