Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 taking refuge in the Monastery: (5)
As of 2016-08-28 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (390 votes). Check out past polls.