Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Regex Pipe Return

by roboticus (Canon)
on Dec 27, 2012 at 01:24 UTC ( #1010435=note: print w/ replies, xml ) Need Help??


in reply to Regex Pipe Return

TapTapTaperoo:

Sure ... use a character class (or non-capturing grouping). Something like:

my $string = 'xxxxxxabxxx'; print $1 if $string = /(x*[ab][ab]x*)/;

should work.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re: Regex Pipe Return
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2014-10-23 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (125 votes), past polls