Ladislav, Petr, Andrew, Thanks for the help on parse - I can see now what I should be doing! Thanks also to Brett Handley for his useful "Parse Tutorial".
John ----- Original Message ----- From: "Ladislav Mecir" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 12, 2001 12:07 PM Subject: [REBOL] Re: Parse query > Hi John, > > << > (...) > Also can the rules enforce specific character sequences > > e.g. dd/mm/yyyyy because my reading of a rule like > 2 digit "/" 2 digit "/" 4 digit is that it would allow values like > 31 /01/ 1997 i.e. embedded white space between terms? > > John > > (...) > >> > > you can go like this: > > digit: charset [#"0" - #"9"] > date: [2 digit #"/" 2 digit #"/" 5 digit] > dates: copy [] > all-dates: [any [copy one-date date (append dates one-date) | skip]] > ; notice the /all refinement enabling you to control spaces > parse/all "abcv 12/01/20001 ffdsa 03/06/30002 31/ 01/40005" all-dates > dates > > == ["12/01/20001" "03/06/30002"] > > Cheers > Ladislav > > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
