Learn Before
  • Basic Regular Expression Patterns

Disjunction (OR) operator |

This operator represents the "or" condition logic. Text strings at both sides of the operator represent conditions to be matched. The operator "|" is also called the pipe symbol.

E.g. /cat|dog/ -> matches either the string cat or the string dog.

0

1

5 years ago

Tags

Regular Expression

Data Science

Related
  • Kleene *

  • Kleene +

  • Disjunction (OR) operator |

  • Parenthesis (grouping) operator ()

  • Operators for counting (regular expression)

  • Aliases for common ranges in regular expression

  • Disjunction: []

  • Range: -

  • Anchors: $

  • Exclude: ^

  • Optional elements: ?