After constructing regular expression, you can evaliate like a mathematical expression, that is, from left to right and in accordance with a priority order.
The following table lists the priority order of various regular expression operators from the highest priority to the lowest priority:
Operator describes / escape (), (? :), (? =), [] Parentheses and square brackets *, ,?, {N}, {n,}, {n, m} definition ^ , $, / Anymetachacter location and order | "or" operation