Demo

Input:

reMatch(strRegex, strString, [intStart], [strScope], [boolReturnLenPos], [boolCaseSensitive])

Output:

array
1
struct
LEN 3
POS 1
VALUE aaa
2
struct
LEN 1
POS 10
VALUE a

Source Code

Note: The code below contains four additional UDFs (reMatchNoCase, match, matchNoCase, and reEscape) which cannot be tested using the above demo.

Feedback? Bugs? Please leave comments on the related blog post.