in reply to Priority of | regex operator

the * is greedy, so (.*) eats up as much of the string as it can. When it reaches the end of the string, it backtracks to see if it can make the second group match, and the first time that happens is on the three dots. So it doesn't have to do with the priority or the order of the | at all.

Take a look at this input:

this_line_'aaaaaa|bbbbbb|cccccc|dddddd|eeeee...'_
That will result in
aaaaaa|bbbbbb|cccccc|dddddd|eeeee...
because the '_ is the first bit that makes the second group match successfully.