array of exact match of string in js regex code example
Example: javascript regex exact match
var r = /^a$/
function matchExact(r, str) {
var match = str.match(r);
return match && str === match[0];
}
var r = /^a$/
function matchExact(r, str) {
var match = str.match(r);
return match && str === match[0];
}