Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Regex Pipe Return

by LanX (Chancellor)
on Dec 27, 2012 at 01:34 UTC ( #1010436=note: print w/replies, xml ) Need Help??


in reply to Regex Pipe Return

not sure what you want...

you want this:

$string =~ m/(A|B)(A|B)/; $match="$1$2";

or this:

$string =~ s/(A|B)(A|B)/lc("$1$2")/e;

or do you need $PREMATCH, $MATCH and $POSTMATCH ?

Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010436]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2016-09-27 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (502 votes). Check out past polls.