I’m bangging my head trying to figure out what’s the correct regular expression to split this string:
[ABC]!=[BCD]=
Into this splitted result:
- [ABC]
- !=
- [BCD]
- =
My actual regular expression pattern is:
(?<=!=|=)|(?=!=|=)
But the result i’m getting is:
- [ABC]
- !
- =
- [BCD]
- =
Please help!
It’s much simpler:
gives you
["[ABC]", "!=", "[BCD]", "="].