How can I exclude a word by using re?

Paul McGuire ptmcg at austin.rr.com
Tue Aug 16 14:33:48 EDT 2005


I just reviewed what the re "\s" signifies: whitespace.  This is easy,
pyparsing ignores all intervening whitespace by default.  So mp3Entry
simplfies to:

mp3entry = valign + number.setResultsName("number"­­­) + tdEnd + \
            tdStart + aStart + \
            SkipTo(tdEnd).setResultsName("­n­ame") + tdEnd

which leads me to another question - isn't there a closing </a> in
there somewhere, probably at the end of the name?  If so, then you
might be better off with:

mp3entry = valign + number.setResultsName("number"­­­) + tdEnd + \
            tdStart + aStart + \
            SkipTo(aEnd).setResultsName("­n­ame") + aEnd + tdEnd

-- Paul




More information about the Python-list mailing list