I am looking for a regex that finds the match only and only if either the word KO or the word OK is not present within the string (regardless of what is before and after).
I tried this:
[^OK|KO]
But it doesn't work.
example of what I would like to match:
20032023
example of what I would like NOT to match:
I think you are looking for something like this (?!.*(OK|KO).*)^.+$
. here ^.+$
is a main match (it matches whole lines), and (!?....)
piece makes the negation, so matches that also contain OK|KO won't be taken