in reply to Re: Regexp dashes at boundaries
in thread Regexp dashes at boundaries
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regexp dashes at boundaries
by ww (Archbishop) on Mar 18, 2005 at 15:25 UTC |