Hi PeO,

yes having 'to and 'thru work on subrules would make some
things so much easier ...

Well, here is my suggestion, with the added benefit, that
it works even if one of the month abbrevs is part of the
text before the date.

[REBOL[]
fdata: {
----------------------------------------------------------------------------
                       Some other text here
                    June and May walked the talk
                            May 11 2001
                       Some other text here
----------------------------------------------------------------------------
} 

space: [ thru " " ]
digit: charset [#"0" - #"9"]
month: [ "jan" | "feb" | "mar" | "apr" | "may" | "jun" | "jul" | "aug" | 
 "sep" | "oct" | "nov" | "dec" ]
day: [ 1 2 digit ] 
year: [ 2 4 digit ] 
the_rule: [ copy m month space copy d day space copy y year ]

parse/all fdata [ any [ the_rule to end | thru " " ]] 
date: to-date rejoin [y "-" m "-" d]
]


kind regards,

Ingo

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to