The word_finder regular expression defines what will be considered a
word.

"[a-z0-9_]" means "match a single character from the set {a through z,
0 through 9, underscore}".
The + means "match as many as you can, minimum of one"

To match @ as well, add it to the set of characters to match:

   word_finder = re.compile('[EMAIL PROTECTED]', re.I)

The re.I flag makes the expression case insensitive.
See the documentation for re for more information.


Also--- It looks like I forgot to lowercase matched words.  The line
   word = match.group(0)
should read:
   word = match.group(0).lower()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to