nl_tokens: Finds the first index based on a regex match
pl_tokens: function indexOfMatch ( string , regex , index ) { const str = <mask> !== null ? string . substring ( index ) : string ; const matches = str . match ( regex ) ; return matches ? str . indexOf ( matches [ 0 ] ) + index : - 1 ; }