I'm trying to conduct a NOT LIKE Condition1 OR Condition2 OR Condition3 equivalence in Regex. I want to find all strings which does not include any of the substrings RSBO,RRABO,RSISTA0
From this thread here I've concluded that one can write ^((?!RSISTA0).)*$
to find all strings which does not include the phrase RSISTA0
So for my requirement when I have three conditions that must be met I tried:
^((?!RSBO).)*$|^((?!RRABO).)*)$|^((?!RSISTA0).)*$
, but then I figured that the |
operation should probably be a AND
equivalence. For this I found that one can mimic the AND
operation here
This gave me the solution:
(?=^((?!RSBO).)*$)(?=^((?!RRABO).)*)$(?=^((?!RSISTA0).)*$)
This, however, causes me to not return any strings at all, even though I know that there are some strings which does not contain any of the substrings I need to filter out.
Does anyone have any idea?