2

I have a question about operator precedence hierarchy, why "Because sequences have a higher precedence than disjunction, /the|any/ matches the or any but not thany or they"? I just couldn't understand why this result reflects "precedence over disjunction"?

Wei Ren
  • 23
  • 2

1 Answers1

0

If the disjunction operator had a higher precedence than grouping together each sequence of characters, than it could operate on the individual characters or subgroups. It could be interpreted as something like /the(e|an)y/

Tyberius
  • 625
  • 2
  • 12
  • 20