Xbasic
regex_literal_extract Function
Syntax
C REGEX_LITERAL_EXTRACT(text as c,RegEx as c[,options as c])
Arguments
- text
Input to extract dynamic portions from.
- RegEx
Pattern that contains literals and dynamic elements
- options
If regex ranges are included, '+' to extend the range regex_literal_mask_get function regarding the '+' option.
Description
Extract the literal characters from a decorated string. This processes input that is expected to contain delimiters, stripping out the delimiters, leaving just the data.
This is useful for processing data (removing a mask) before storage.
Example
' Remove the 'literal' characters from input , leaving only the dynamic portions. ? regex_literal_extract("1-(800) 451 1018","[0-9]-\([0-9][0-9][0-9]\) [0-9][0-9][0-9] [0-9][0-9][0-9][0-9]") = "18004511018"
See Also