find Word A not followed by word B,C or D.

What would be a regular expression for "find word A not followed by word B,C or D."?
deleydAsked:
Who is Participating?
 
farzanjCommented:
For the second word immediately following the first you may have :
wordA(?!\s*(?:wordB|wordC|wordD))
0
 
farzanjCommented:
Try this:
wordA(?!.*(?:wordB|wordC|wordD))
0
 
ozoCommented:
A(?!B|C|D)
0
 
ozoCommented:
Do you mean not followed at all, or not followed immediately?
0
 
karunamoorthyCommented:
Try this,

A*
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.