Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

regular expression to check ' \ '

I am using the following regular expression to check name format.

/^([A-Za-z0-9\[email protected]])*$/

Name should contain only alphanumeric characters,_,@,.,-and space. But this regular expression is not restricting '\'.

like image 624
Jaison Avatar asked Aug 29 '26 11:08

Jaison


1 Answers

try this

[A-Za-z_-@. 0-9]{1,250}

like image 157
Sivajith Avatar answered Sep 01 '26 02:09

Sivajith