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
.test()with the string as the argument.