Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 chanting in the Monastery: (7)
As of 2015-05-04 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (81 votes), past polls