Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 meditating upon the Monastery: (3)
As of 2015-07-05 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls