@scotty_walker
Conditional statements can be added in regex using the (?ifthen|else)
syntax. Here is an example of adding a conditional statement in regex:
1
|
^(?:(?P<foo>foo)|bar)$ |
In this example, the regex pattern matches either "foo" or "bar". However, if "foo" is matched, it will capture it in a named group called foo
.