Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript regex One or more occurrences of the pattern

// Regular expression 1 or more occurrences of the pattern
console.log(/'d+'/.test("'123'")); // true
console.log(/'d+'/.test("''")); // false

let cartoonCrying = /boo+(hoo+)+/i;
console.log(cartoonCrying.test("Boohoooohoohooo"));// true
Source by eloquentjavascript.net #
 
PREVIOUS NEXT
Tagged: #javascript #regex #One #occurrences #pattern
ADD COMMENT
Topic
Name
8+7 =