Match either a or b
(a|b)Matches the a or the b part of the subexpression.
Examples
JAVASCRIPT PYTHON PCRE
Share & Embed
Use this snippet to display this token on your own site.
<!-- Embed Regex Token: (a|b) --> <code class="regex-token">(a|b)</code> - Match either a or b <small><a href="https://testregex.com/cheatsheet/match-either-a-or-b">See details</a></small>