I am using Raku 2020.10.
According to this page, https://docs.raku.org/language/regexes#Longest_alternation:_| , "|" or quoted lists are longest matches.
> say "youtube" ~~ / < you tube > /
「you」 # expected "tube" to win the match
> say "youtube" ~~ / you | tube /
「you」 # expected "tube" to win the match
> say "youtube" ~~ / tube | you /
「you」 # expected "tube" to win the match
Now trying "||" instead of "|":
> say "tubeyou" ~~ / you || tube /
「tube」 # longest match or first match?
> say "youtube" ~~ / you || tube /
「you」 # first match?
Now trying web page example:
> say 'food' ~~ / f | fo | foo | food /
「food」 # works as expected
> say 'foodtubes' ~~ / f | fo | foo | food | tubes /
「food」 # expected "tubes" (5 chars) to win
> say 'foodtubes' ~~ / tubes | f | fo | foo | food /
「food」
> say 'foodtubes' ~~ / dt /
「dt」
> say 'foodtubes' ~~ / dt | food /
「food」
> say 'foodtubes' ~~ / dt | food | tubes /
「food」
Seems like the matching engine with "|" quits after first somewhat longish successful match. Or what did I do wrong?
Thanks !!!