In article <8404fac9-06c7-4555-93af-c78f5e01d...@j21g2000yqh.googlegroups.com>,
Booter  <colo.av...@gmail.com> wrote:
>
>I am trying to replace a series of periods in a sting with backspaces
>that way I can easily parse information from a Windows command.  the
>current statement I have for this is
>
>capture = re.sub('\.*', '\b', capture)

What's wrong with 

capture = capture.replace('.', '\b')

That will be much faster.
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

"...string iteration isn't about treating strings as sequences of strings, 
it's about treating strings as sequences of characters.  The fact that
characters are also strings is the reason we have problems, but characters 
are strings for other good reasons."  --Aahz
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to