You should compile textObj and urlObj outside of getVals. You could just pull the four lines that create textObj and urlObj outside of the function (into global scope). You just have to compile a regex once, then you can use it multiple times. Compiling is relatively slow so pulling it out of the loop is an optimization.
Congrats on getting this working! Kent
Liam Clarke wrote:
Hi Kent,
Thanks for the help, it worked third time around!
The final product is here if you have an interest - http://www.rafb.net/paste/results/XCYthC70.html
But, I think I found a new best friend for this sort of thing - (?P<text>.*?)
Being able to label stuff is brilliant.
But yeah, thanks for the help, especially that sub method.
Regards,
Liam Clarke
_______________________________________________ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor