in reply to Puzzle Regex: Letter Frequency Arithmetic Sequence
Please see How do I post a question effectively?
Supposing the frequency of letters has to be an ascending sequence. ..
I'm not aware of a possibility to sum the count of matches in pure ² m// regexes so probably it's possible in tr// but those can't backtrack.
Probably if you code 1..n matches for a fixed n into your regex and combine n look-aheads you can built an and condition. *
This wouldn't work for arbitrary big n though.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
*) that is find one letter exactly once and find one letter exactly twice and so on.
already the first term is too tricky for me...
²) no Perl embedded
First step: What is a regex to find one letter exactly once?
Waiting for tybalt89 ... tick tock tick tock ... ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Puzzle Regex: Letter Frequency Arithmetic Sequence
by tybalt89 (Monsignor) on Oct 17, 2017 at 23:47 UTC | |
by QM (Parson) on Oct 19, 2017 at 13:17 UTC | |
|
Re^2: Puzzle Regex: Letter Frequency Arithmetic Sequence
by tybalt89 (Monsignor) on Oct 19, 2017 at 09:32 UTC | |
by LanX (Saint) on Oct 20, 2017 at 18:20 UTC | |
|
Re^2: Puzzle Regex: Letter Frequency Arithmetic Sequence
by QM (Parson) on Oct 18, 2017 at 17:18 UTC | |
by LanX (Saint) on Oct 18, 2017 at 17:33 UTC |