newLISP Fan Club

Forum => Anything else we might add? => Topic started by: newdep on March 07, 2004, 04:00:29 AM

Title: parse
Post by: newdep on March 07, 2004, 04:00:29 AM
Hello Lutz,



Not using regexp.

Is it possible to extend 'parse with an 'or 'and 'between selector?

I might be nagging here because the Regex lib is there

to catch these, still a more lispy version might be prefered

by others too i can emagine?



>(parse "once twice once one ounce once" (or "once"  "one") )

( "twice ounce" )



>(parse "once twice once one tripple ounce once" (and "once"  "tripple" ) )

( "twice one ounce" )



or a 'from/to (between), but i prefer the 'or and 'and more



>(parse "once twice once tripple one ounce once" (between "twice" - "tripple"))

( "once twice tripple one ounce once"  )





I tried the trick above (never know :-) but did unfortunatly not work ..



Regards,

Norman.