I am working with a Regex to validate a string with the following requeriments:
- It does not start with special characters.
- It can countains numbers, letters and special characters, with the exception of periods and parentheses.
- Special characters can appear 1 time only.
The Regex i have is this one:
/^[a-zA-Z0-9]+(?!\S*([\W_.()])\S*\1{1,})\S*$/
The regex is not working fine, because it continues accepting periods and parentheses.
Would you know how can achieve the above requeriments?
Thanks in Advance.