How to make sure that 1 and 11 exist at the same time when there is a "1d11" in a string.

how to make sure that 1 and 11 exist at the same time

when there is "1BI 11" in a string.
var str = "1,11"
if(str.toString().indexOf("11") != -1 && str.toString().indexOf("1") != -1 ){
    return true;
}

the problem is that str= "2BI 11" will also meet the above judgment conditions

Apr.28,2021

two regular expressions

  

if the data format is determined, it is , separated by . Then change it to an array and then judge.

Menu