3
Answers

Testing regular expression with single quotes giving error

Photo of Sanal Rajan

Sanal Rajan

7y
671
1
var Reg1= /^(^[a-zA-Z0-9-.,#/()&/'';:~`@#$%^*_+= -]{2,50})*$/;
if (!Reg1.test(txtreg)) {
}
 
This regular cotains single quotes. How to check this regular expression? 

Answers (3)