bindingMatchVar( Binding, Int )

Returns the section of the original string matched by one of the regular expression's match variables. The match variable is specified as an integer, with 1 representing the first match variable in the original regular expression.

:-) var regex = //one (.*) three (.*)/;
There are 0 results
:-) var binding = regex.findMatch( "one two three four" );
There are 0 results
;-) binding.bindingMatchVar( 1 );
There is 1 result
"two"
;-)
;-) binding.bindingMatchVar( 2 );
There is 1 result
"four"
      

Note that unlike other languages, like Perl or Java, there is no zero'th match variable. In those languages you could use an index of zero to obtain the entire matched string. In MillScript you need to use the bindingMatched function instead.