117
rated 0 times
[
124]
[
7]
/ answers: 1 / hits: 13867
/ 5 Years ago, mon, august 26, 2019, 12:00:00
Check if a JavaScript string includes a substring that matches a regex.
I have tried string.includes(substring)
var myString = This is my test string: AA.12.B.12 with some other chars;
myString.includes(/^[A-Z]{2}.d{2}.[A-Z]{1}.d{2,3}$/);
True, False
However, code doesn't compile
More From » javascript