Re: Pattern matching

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

How about

?filter("abcdefghijklmnopqrstuvwxyz","in","aeiou") 

(That's Phix, but pretty sure I nicked it from Euphoria)

Just for ideas, a decidely more Phix-only approach, which uses some features you can't have just yet, would be:

string az = "abcdefghijklmnopqrstuvwxyz", bz = az[2..$] 
for s in {az,bz} do 
    ?scanf(s,"%sa%se%si%so%su%s") 
end for 
--output: 
--{{"","bcd","fgh","jklmn","pqrst","vwxyz"}}    -- (az, pass) 
--{}                                            -- (bz, fail) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu