var string = \'abcd+1\'; var pattern = \'d+1\' var reg = new RegExp(pattern,\'\'); alert(string.search(reg));
I found out last night that if you tr
Easy way to make it :
The alphabet is : "[\+]"
[\+]
All plus signs we want to find : "[\+]*"
[\+]*