Here are two expressions for negative and positive checks:
- Matching a string that has no @handles or has at least two:
/^(?!.*@\w)|@\w.*@\w/– see proof
- Matching a string that only has one @handle:
/^(?!.*@\w.*@\w).*@\w/– see proof.
I think your @handle must be
@ + a word character, not a single
CLICK HERE to find out more related problems solutions.