How can I create one regex that does the following:
"in general, create a common regex. But if specific characters follow each other, look at the line following these specific characters differently?"
one == two && three | four
The general regex will be: [&|=\s]+ .
This will lead to decay: one, two, three, four .
But what if I want to apply another regular expression every time there is a = character, and you want the expression that appears after = to stop only on the | character ? To get the result: one, two && three, four .
How can i do this?
source share