Conditional pattern as described here doesnt seem to work
See my current setup
I am trying to match any line that contains test and pie, any ideas what I am doing wrong?
Conditional pattern as described here doesnt seem to work
See my current setup
I am trying to match any line that contains test and pie, any ideas what I am doing wrong?
My guess is that you might be trying to design some expression that might look like:
(?(exp)(?P<exp>)\btest\b|(?P<fruits>)\bpie\b)
or
(?(1)(\btest\b)|(\bpie\b))
The expression is explained on the top right panel of regex101.com, if you wish to explore/simplify/modify it, and in this link, you can watch how it would match against some sample inputs, if you like.