Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js regexp match

// ES2022
const matchObj = /(a+)(b+)/d.exec('aaaabb');

console.log(matchObj);
/*
Output -
['aaaabb', 'aaaa', 'bb', index: 0, input: 'aaaabb', groups: undefined, indices: Array(3)]
*/
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #js #regexp #match
ADD COMMENT
Topic
Name
1+9 =