exact match string javascript 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];
}