[twill] twill bug

Titus Brown titus at caltech.edu
Wed Mar 22 23:58:52 PST 2006


On Thu, Mar 23, 2006 at 12:12:20AM -0300, Leonardo Santagada wrote:
-> On 3/22/06, Titus Brown <titus at caltech.edu> wrote:
-> > Isn't this exactly what it does?
-> 
-> maybe, but the help find didn't say so and also this test on the slashdot home:
-> 
-> >> find slashdot.org(\S+) i
-> current page: http://slashdot.org
-> >> echo __match__
-> slashdot.org/base.css"
-> current page: http://slashdot.org
-> 
-> should say /base.css" if it was using the first group in the regex. My
-> sugestion is to put in __match__ the group named "match" or the
-> complete match if there is no such grouping. another idea would be to
-> have a way to get the named groups in a regex. What do you think?

Hi, Leonardo,

I've changed it so that the first subgroup is put in __match__, if any;
otherwise the entire string is returned.  So

>> find slashdot.org(\S+)

will set __match__ to '/base.css', while

>> find slashdot.org\S+

will set __match__ to 'slashdot.org/base.css'.

cheers,
--titus



More information about the twill mailing list