Builds a regular expression that groups subexpressions
A utility function used by some of the RE generators. The
subexpressions are constructed by the function, re, in the second
parameter. re builds one subexpression for each elem in the array
a, in the first parameter. Returns a string for a regular
expression that groups all the subexpressions.
Parameter |
Type |
Usage |
Description |
arr |
Object|Array |
required |
A single value or an array of values. |
re |
Function |
required |
A function. Takes one parameter and converts it to a regular
expression. |
nonCapture |
Boolean |
optional |
If true, uses non-capturing match, otherwise matches are retained
by regular expression. Defaults to false |