Message4510
Logged In: YES
user_id=31435
Assigned to /F. Works for me on Win98 under 2.1. Binding
m to the re result and then printing
print m.span(), len(output), m.span(1), m.span(2)
yields
(8, 12112) 12112 (25, 43) (44, 12111)
Anonymous, this is a poor use for regexps: the code would
be clearer, simpler and faster (plus it wouldn't blow up
<wink>) if you used basic string operations instead. The
(.*?)\s*$ at the end is especially wasteful: you're
teilling the regexp engine to do 12,000+ useless match
attempts there, when all you *want* is the entire tail end
of the string stripped of trailing whitespace. So just
grab the tail end of the string directly and do
string.rstrip() on it; saves 12,000+ useless matching
attempts. |
|
Date |
User |
Action |
Args |
2007-08-23 13:54:15 | admin | link | issue418626 messages |
2007-08-23 13:54:15 | admin | create | |
|