Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regex must match exactly

var str = 'the first 3 letters of the alphabet are abc. not abc123';
var pat = /(abc)/g;
console.log(str.match(pat)); // ["abc"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #regex #match
ADD COMMENT
Topic
Name
3+1 =