Learn Before
  • Regular Expression

Operator precedence hierarchy

The order of regex operator precedence: Parenthesis > Counters > Sequences and anchors > Disjunction.

For example, the Kleene* operator applies by default only to a single character, not to a whole sequence. The whole pattern can be repeated zero or more times if we can add * after the search pattern in ().

0

1

4 years ago

Tags

Regular Expression

Data Science

Related
  • Regular expression reference

  • Basic Regular Expression Patterns

  • Operator precedence hierarchy

  • Greedy/ non-greedy matching

  • False positive and false negative errors for regex matching

  • Regular Expression Cheatsheet

  • Capture Group

  • Non-capturing Group

  • Lookhead Assertion

  • Greedy Matching in Regular Expression

  • Non-greedy Matching in Regular Expression