The alternation meta-character | works on the two entities directly next to it.
Not in Perl:
If what you said were true, the match above would have failed, and the contents of $t would have remained unchanged.$t = 'abcd'; $t =~ s/bc|xy/pq/; print "$t\n"; ==> apqd
the lowliest monk
In reply to Re^2: Regexp dashes at boundaries
by tlm
in thread Regexp dashes at boundaries
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |