Page 1 of 1

parse

Posted: Sun Mar 07, 2004 12:00 pm
by newdep
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.