Hi,
I have a form where I want to check the phone number format, and the "+" sign in regex seems to be not accepted:
(phone number must b +412212341234)

This works :
var number=field.getValue()
var regex = new RegExp("^41221234([0-9]{4})$");
if (regex.test(number)){
.......

But if I want to insert the "+" (escaped), the form return an error :
var number=field.getValue()
var regex = new RegExp("^\+41221234([0-9]{4})$");
if (regex.test(number)){
.......


The error is "syntax error : invalid regular expression : ..... Nothing to repeat during script execution .....


Any help ?

Thanks

Sylvain