Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript regex Zero or one occurrence

// javascript regex Zero or one occurrence
let neighbor = /neighbou?r/;
console.log(neighbor.test("neighbour")); // true
console.log(neighbor.test("neighbor")); // true
Source by eloquentjavascript.net #
 
PREVIOUS NEXT
Tagged: #javascript #regex #Zero #occurrence
ADD COMMENT
Topic
Name
3+7 =