__Title__

**[M-5] regexm()** -- Regular expression match

__Syntax__

*real matrix* **regexm(***string matrix s***,** *string matrix re***)**

*string matrix* **regexr(***string matrix s1***,** *string matrix re***,** *string*
*matrix s2***)**

*string matrix* **regexs(***void***)**

*string matrix* **regexs(***real scalar n***)**

__Description__

**regexm(***s***,** *re***)** returns one or zero, corresponding to a match or no match,
of regular expression string *re* against *s*.

**regexr(***s1***,** *re***,** *s2***)** returns the result of replacing the first substring
within *s1* that matches *re* with *s2*. If *s1* contains no string that matches
the regular expression *re*, the unaltered *s1* is returned.

**regexs(***void***)** returns all subexpressions from a previous **regexm()** match as
a matrix of strings.

**regexs(***n***)** returns subexpression *n* from a previous **regexm()** match, where
0 __<__ *n* < 10. Subexpression 0 is reserved for the entire string that
satisfied the regular expression.

When *s*, *s1*, *s2*, and *re* are not scalar, these functions return
element-by-element results.

__Remarks__

The syntax for these undocumented functions may change in the future.

__Conformability__

**regexm(***s*, *re***)**, **regexr(***s1***,** *re***,** *s2***)**,
*s***,** *s1***,** *re***,** *s2*: *r x c*
*result*: *r x c*

__Diagnostics__

None.

__Source code__

Functions are built in.