A vote for re scanner
Dang Griffith
noemail at noemail4u.com
Thu Nov 13 07:06:10 EST 2003
On 12 Nov 2003 13:04:36 -0800, wade at lightlink.com (Wade Leftwich)
wrote:
>tweedgeezer at hotmail.com (Jeremy Fincher) wrote in message news:<698f09f8.0311101455.41f8706a at posting.google.com>...
>> wade at lightlink.com (Wade Leftwich) wrote in message news:<5b4785ee.0311100714.1445cdfb at posting.google.com>...
>> > Every couple of months I have a use for the experimental 'scanner'
>> > object in the re module, and when I do, as I did this morning, it's
>> > really handy. So if anyone is counting votes for making it a standard
>> > part of the module, here's my vote:
>>
>> While I don't think they're still accepting votes :), you've pointed
>> me to something I didn't know about until now. What kinds of things
>> have you been using re.Scanner for?
>>
>> Jeremy
>
>A scanner is constructed from a regex object and a string to be
>scanned. Each call to the scanner's search() method returns the next
>match object of the regex on the string. So to work on a string that
>has multiple matches, it's the bee's roller skates.
Or in Eric's case, *the* roller skate.
--dang
More information about the Python-list
mailing list