JSFiddle - React, Tailwind, and code Playground
JavaScript
String.prototype.matchGroup = function(re, group) {
var m = re.exec(string);
var strs = [];
while(m != null) {
strs.push(m[group]);
m = re.exec(string);
}
return strs;
}
var string = 'The value is ij35dss. The value is fsd53fdsfds.';
alert(string.matchGroup(/The value is (.*?)\./g, 1));