Matching a string up to a word
Dag
dag at animagicnet.no
Wed Sep 4 10:48:50 EDT 2002
In article <3d75ffaa$1 at news.sentex.net>, Peter Hansen wrote:
>
> Can you instead guarantee the format of the date that follows the
> filename? Will it always consist of the day of the week, the month,
> the date, and the year? That would turn this into a relatively
> simple problem.
Yes I can guarentee the last four fields be in that date format.
Actually I think that solved it. I'll split on whitespaces into
an array, and remove the first and last four fields, and then join
whatever's left. That should do it. I was stuck thinking how to
parse it left to right.
Thanks for making look at the problem slightly differently.
Dag
More information about the Python-list
mailing list