On Fri, Feb 17, 2006 at 03:23:26PM -0600, Terry Peppers wrote:
-> I just started playing around with twill and I really like it so far. I had
-> a question about the find command. The docs say the following:
->
-> *find* *<regexp>* -- assert that the page contains this regular expression.
-> The variable __match__ is set to the matching string.
->
-> If I have a body of text like this: "Foo bar foo"
->
-> And I say "find foo" - will 'find' locate both instances of 'foo?'
Hi, Terry,
The Python code is this:
m = regexp.search(page)
local_dict['__match__'] = m.group()
'search' stops at the first match, so all you'll get is the first match.
cheers,
--titus
_______________________________________________
twill mailing list
[email protected]
http://lists.idyll.org/listinfo/twill