Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript regex all matches match

let array = [...str.matchAll(regexp)];

array[0];
// ['test1', 'e', 'st1', '1', index: 0, input: 'test1test2', length: 4]
array[1];
// ['test2', 'e', 'st2', '2', index: 5, input: 'test1test2', length: 4]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #regex #matches #match
ADD COMMENT
Topic
Name
1+1 =