Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 meditating upon the Monastery: (8)
As of 2015-08-31 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (354 votes), past polls