Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Regex Pipe Return

by LanX (Canon)
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


Comment on Re: Regex Pipe Return
Select or Download Code

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 cooling their heels in the Monastery: (4)
As of 2014-10-31 05:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (214 votes), past polls