i want test regular expresion this: 213+123, number plus + plus number. de code:
var re = /\d+[+]\d+/ result = window.eval(command); var bool = re.test(result); the code respond false if try enter 234+234. help
the problem not regex eval.
var command = "234+234"; var result = window.eval(command); // result 468 regex fail var bool = re.test(result); // equals re.test(468); instead call on command
var command = "234+234"; var bool = re.test(command); // equals re.test("234+234");
Comments
Post a Comment