use:

^[^\s][ A-Za-z-'@.,/]*$
  • ^[^\s] checks that there is no whitespace at the beginning
  • A-Za-z accepts all the alphabets in the given string
  • -'@.,/ accepts only these special characters
  • * matches 0 or more preceding token

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top