list llRegexMatch(string pattern, string input, integer flags);
list llRegexSearch(string pattern, string input, integer flags);
list llRegexSplit(string pattern, string input, integer flags);
string llRegexReplace(string pattern, string replace, string input, integer count, integer flags);
This would also implement a long requested ability to replace substring instances.
In all instances EXCEPT replace, list would return the following:
[
integer matches,
integer sizeOfMatch,
... match data ...,
integer sizeOfMatch#,
... match# data ...,
...
]
If named groups is disabled, group data would return a list of matches.
If named groups IS enabled, return a tuple of [string groupName, string groupValue].
If zero matches, return a empty list. (So that if(emptyList) works)