Re: Euphoria sucks at golfing

new topic     » goto parent     » topic index » view thread      » older message » newer message

Not the shortest, but probably the most terse:

include std/regex.e 
include std/sequence.e 
include std/utils.e 
object X=regex:find(new("(?i)(l).*?(l).*?(a).*?(m).*?(a)"),gets(0)) 
? iff(atom(X), {}, vslice(X[2..6],2)) 

Shorter:

include std/regex.e 
include std/sequence.e 
object X=regex:find(new("(?i)(l).*?(l).*?(a).*?(m).*?(a)"),gets(0)) 
if atom(X)then?{}else?vslice(X[2..6],2)end if 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu