Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Junk NOT words

by John M. Dlugosz (Monsignor)
on Oct 31, 2002 at 21:46 UTC ( #209541=note: print w/ replies, xml ) Need Help??


in reply to Junk NOT words

I think it would be easy enough to check a dictionary for a prefix string, adding another char if it isn't; then recurse on the rest of the string. Backtrack, trying a longer prefix, if it doesn't pan out down the road.

In fact, a Perl6 pattern could easily do this.

In Perl5 regex, I would think the "code" assertion would do, but the docs are inconsistant and I've never used it since the docs scared me off with "experimental". The issues are (1) can it "fail", and (2) how to get the most-recient pattern's contents.


Comment on Re: Junk NOT words

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2014-07-10 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (213 votes), past polls