Re: Pattern matching
- Posted by petelomax Feb 01, 2023
- 431 views
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)