Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regex reuse pattern

let repeatNum = "42 42 42";
let reRegex = /^(d+)s1s1$/;
let result = reRegex.test(repeatNum);
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #regex #reuse #pattern
ADD COMMENT
Topic
Name
4+2 =