Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: nested combinations: algorithm advice?

by revdiablo (Prior)
on Sep 22, 2004 at 16:50 UTC ( #392973=note: print w/replies, xml ) Need Help??


in reply to Re: nested combinations: algorithm advice?
in thread nested combinations: algorithm advice?

Excellent! I thought there might be a nicer way than the brute-force combinations. Also, using regexes instead of looping on the word lists is nice -- let the regex engine do the dirty work. Thanks for the reply, I will probably steal your ideas. :)

  • Comment on Re^2: nested combinations: algorithm advice?

Replies are listed 'Best First'.
Re^3: nested combinations: algorithm advice?
by bmann (Priest) on Sep 22, 2004 at 18:31 UTC
    Glad you liked it. One caveat though - craft your regex with care if you use this (or use a hash like jasper's version below, which doesn't suffer from this problem). The regex I used was naive in that it doesn't detect the boundary between the words. Add "twop_threep" to DATA, you'll see a false positive.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2019-11-21 23:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (107 votes). Check out past polls.

    Notices?