I'm certainly sorry you had trouble using this recipe.
For what it's worth, a regular expression match object has *both* a
group() and groups() method. I intended the former, but it's valid
to prefer the latter. Either way, I didn't continue the recipe beyond
the point where you get *something* back because getting any results
*at all* is the part that seems to cause the most difficulty.
Anyone who intends to use this recipe would be well advised to check
out the docs on regular expression match objects and determine if what
this recipe gives them is, in fact, what they actually want.
Some links of potential interest:
http://docs.python.org/lib/match-objects.html
http://www.amk.ca/python/howto/regex/
HTH & sorry for any confusion. I've edited the recipe to flag the
potential for confusion. |