Answers for "regex must match exactly"

0

regex must match exactly

var str = 'the first 3 letters of the alphabet are abc. not abc123';
var pat = /\b(abc)\b/g;
console.log(str.match(pat)); // ["abc"]
Posted by: Guest on May-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language