Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
Your skill will accomplish
what the force of many cannot
 
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 pondering the Monastery: (5)
As of 2014-04-18 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls