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

Re: Regex Pipe Return

by roboticus (Chancellor)
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010435]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-12-11 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (289 votes). Check out past polls.

    Notices?