This program converts the regex matches into ranges array so that continue to use the Ranges workflow — process the string in composable fashion — gather many pending string amendment operations, reason about them, process them, and finally, in the end, “render” ranges into the result string and do it only once.
The main function
rRegex() is imported like this:
It’s a function which takes three input arguments:
This package does not mutate its inputs.
Type: Regular expression
|Provide the regexp to apply onto a string
|Provide a string upon which to match the regex
Type: String or
|If you want to add a third argument on every of the finding’s third argument values, put it here.
Function will return ranges — a
null (theoretically possible) or array of one or more range arrays:
Tip: You can use all the features of regexes: global, case insensitive flags and so on.
You can import