I want a regular expression to match everything that does not start with X or contains Y.
I currently have the first part: ^(?!X).*$
This will match anything not starting with X. However, I can't get the second part working. I have tried the solution here:
Regex match string that starts with but does not include
but with no luck.
Test cases
Don't match on:
X
XBLABLA
Match on:
XY
BLABLA
Any ideas?