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

Re: Puzzle Regex: Letter Frequency Arithmetic Sequence -- oneliner

by Discipulus (Monsignor)
on Oct 18, 2017 at 08:33 UTC ( #1201559=note: print w/replies, xml ) Need Help??


in reply to Puzzle Regex: Letter Frequency Arithmetic Sequence

ThereIsMoreThanOne.. oneliner to do this!

Me too I'd use hash instead of regexes.

The problem is that you'll end with deadheaded rococo messes or with at least with an ugly fruit salad of ananas patata papaya batata acacia pepper

perl -MList::Util="all" -lne "next unless/.../;my(%r,$c);$r{$_}++for(/ +./g);print if all{++$c==$_}sort values %r" linux.words # or minimum 10 char words only perl -MList::Util="all" -lne "next unless/.{10,}/;my(%r,$c);$r{$_}++fo +r(/./g);print if all{++$c==$_}sort values %r" linux.words

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1201559]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2017-12-15 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (425 votes). Check out past polls.

    Notices?