On Thu, May 11, 2017 at 4:01 PM, Timo Paulssen <t...@wakelift.de> wrote:

> The only way that comes to mind is to use EVAL, but that's not
> golf-friendly at all.
>
> Perhaps you can find something sufficiently short based on .contains,
> .index, .starts-with, .ends-with, and friedns?
>

I'm open to suggestions.  A slightly simplified version of the relevant
part of my current code is this:

$str.comb.classify({ first $_ ~~ *, :k, /<[bdfhkl]>/, /<[gpqy]>/, /<[it]>/,
/j/, True })

I was hoping that I could shorten that list of regexes to something like

<bdfhkl gpqy it j>

which I could then turn into character-class regexes on the fly and avoid
the repeated "/<[" and "]>/".

Reply via email to