I have two strings:
var first = "913 DE 6D 3T 222"
var second = "913 DE 3T 222"
I want to check if second
is present in first
, preferably with regex
. The problem is that indexOf
or includes
returns that second
is not present in first
, which is wrong (only 6D
is the difference):
first.indexOf(second)
-1
first.includes(second)
false