Currently i have this following regex which i use to validate the name of a company/industry and its working fine
/(?=[a-zA-Z0-9-]{5,25}$)^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/
The above regex doesnt supports for special characters like & - . _ which are valid in my case
I came up with this but it wasnt working as expected.
/(?=[a-zA-Z0-9-\&\_\.]{5,25}$)^[a-zA-Z0-9\&\_\.]+(-[a-zA-Z0-9\&\_\.]+)*$/
Can someone point it out where my above regex goes wrong. Also a short explaination of the above regex wud be greatly appreciated Thanks