Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by Discipulus (Canon)
on Oct 18, 2017 at 08:33 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1201559]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-26 03:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found