Pyparsing troubles

poromenos at gmail.com poromenos at gmail.com
Sat Dec 9 19:39:02 EST 2006


Hello,
I have written a small pyparsing parser to recognize dates in the style
"november 1st". I wrote something to the effect of:

expression = task + date

and tried to parse "Doctor's appointment on november 1st", hoping that
task would be "Doctor's appointment" and date would be "on november
1st" (the parser does match "on november 1st" to "date"). I have set
task as Regex(".*?"), ZeroOrMore(Word(alphas)), etc, but I can't get it
to match, it matches everything to task and ignores date until it gets
to the end of the string.

Can anyone help?




More information about the Python-list mailing list