nl_tokens: Extracts prefix from the end of given string that matches match regexp
pl_tokens: function extractPrefix ( str , match ) { let offset = str . <mask> ; while ( offset > 0 ) { if ( ! match . test ( str [ offset - 1 ] ) ) { break ; } offset -- ; } return str . slice ( offset ) ; }