Re: The match_all function

new topic     » goto parent     » topic index » view thread      » older message » newer message
dr_can said...

Inspired by Pete's Rosetta Code triumph

Glad someone is!

dr_can said...

I think 3 and 4, respectively, but match_all yields 3 and 2.

Well that confused me, until I realised you meant length(). Anyway, FYI, this is what Phix can do:

?match_all("th","the three truths")            -- {1,5,14}  (length 3) 
?match_all("abab","ababababab")                -- {1,5}     (length 2) 
?match_all("abab","ababababab",overlap:=true)  -- {1,3,5,7} (length 4) 

See here for the Phix version of match_all().

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

Search



Quick Links

User menu

Not signed in.

Misc Menu