Wouldn't (?:\.\\|\./) mean "full stop, then either backslash or dot, then forward slash"? ... Or does a | placed within grouping parentheses always match the entire first/second half of the grouping?
It is second case: [.\\] is one group of regex, [./] is the other.
To match per your first query, regex would be qr{[.] (?: \\ | . ) /}x (which I would rather write as qr{[.] [.\\] /}x but that is besides the point).
In reply to Re^3: Regex failing when the line starts with "./"
by Anonymous Monk
in thread Regex failing when the line starts with "./"
by perl_mystery
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |