1

Given this regexp:

@([a-z0-9_-]{3,})

I don't want it to match if the pattern is "SpecialUsername".

@Tom = match
@SpecialUsername = no match
@Another = match
etc

How do I modify it for this special case?

3

1 Answer 1

2
(?!SpecialUsername)([a-z0-9_-]{3,})
Sign up to request clarification or add additional context in comments.

1 Comment

so it should probably be something like @(?!SpecialUsername)([a-zA-Z0-9_-]{3,}) ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.