Regex to certain special characters -
currently have following regex use validate name of company/industry , working fine
/(?=[a-za-z0-9-]{5,25}$)^[a-za-z0-9]+(-[a-za-z0-9]+)*$/
the above regex doesnt supports special characters & - . _ valid in case
i came wasnt working expected.
/(?=[a-za-z0-9-\&\_\.]{5,25}$)^[a-za-z0-9\&\_\.]+(-[a-za-z0-9\&\_\.]+)*$/
can point out above regex goes wrong. short explaination of above regex wud appreciated thanks
i don't think have escape &
\&
, same way _
also
/(?=[a-za-z0-9-&_\.]{5,25}$)^[a-za-z0-9&_\.]+(-[a-za-z0-9&_\.]+)*$/