I have the following Regex:
const myRegex = new RegExp(/([a-z|\d]){40,78}/gmi)
I have the following data:
var data = ['abcdefghijlmnopqrstuvxzabcdefghijlmnopqrstuvxz01', 'abcdefghijlmnopqrstuvxzabcdefghijlmnopqrstuvxz02']
I do the following:
1st step:
data.map(d => myRegex.test(d) && console.log(d, 'ok'))
//abcdefghijlmnopqrstuvxzabcdefghijlmnopqrstuvxz01 ok
2nd step:
myRegex.test(data[1])
//true
After performing steps 1 and 2, I execute them again, but this second time the values are inverted !!! Can someone explain to me why?