I need help to do this regex. The sentence can’t be less than 4 letters, and it can’t match any of these word (test1,test2 and test3)
I know how to do each one separately but not together.
First condition ^.{4,}$
Second condition ^((?!test1|test2|test3).)*$
How to do both so that:-
- “hello” will pass
- “hel” will fail
- “test1” will fail although it is more than 4 letters long
- “test2” will fail although it is more than 4 letters long
- “test3” will fail although it is more than 4 letters long
Thanks in advance
Try this one:
Or:
Or: