Posted on: 9/19/2015 6:59:34 PM | Views : 846

Hi all, I'm trying to create a REGEX that will allow a string to have the following features but it's not working.
- Contains either all alphabets or alphanumeric (mixture of numbers and letters)- Must have at least 8 characters but at most 16 characters - Contains no white space- Can have a dot, a star, an underscore, and an @ symbol as optional characters - Cannot have consecutive optional characters - Cannot start or end with an optional character The following is my REGEX :
^[a-z0-9](?!.*_@?[^\na-z0-9]{2}).*?[a-z0-9]{8,16}$/gmi I also tried to replace "[ A-Za-z0-9]" with "\w" but it didn't work. Please explain where I went wrong, thanks in advance.

Go to the complete details ...