Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: RegEx + vs. {1,}

by ELISHEVA (Prior)
on Oct 10, 2012 at 14:16 UTC ( #998232=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print $x = "abcdefgxxabcdefgzzabcdsjfhkdfab", "\n";
    print  "<" . join('|',$x =~ /(\w{2,}?)(?=.*?\1)/g) , ">\n";
    
    #outputs: <ab|cd|ef|ab|cd|ab>
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-11-27 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (180 votes), past polls