I'm quite new to regex. Tried to look at other questions but still can't workout how to resolve my scenario. I want to match string that starts with "AB" but not ABC,or string contains DE but not DEF. For example sDEN23, DET or DE should be matches, AB3 should be matches. I've tried the below so far but it doesn't work as expected. Could someone please help? Many thanks.
Edited: How can this be achieved without using lookahead and lookbehind, as these are not support by Impala?
.*AB?[^C].*|.*DE?[^DEF]