Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50919

Re: Find and Replace Simplification

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; '(at': 0.04; 'expressions': 0.07; 'string': 0.09; 'python': 0.11; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; ':-)': 0.16; 'sender:addr:gmail.com': 0.17; 'shell': 0.22; 'skip': 0.24; 'least': 0.26; 'header:In- Reply-To:1': 0.27; 'fastest': 0.30; 'message-id:@mail.gmail.com': 0.30; 'perl': 0.31; 'regular': 0.32; 'knows': 0.35; 'received:google.com': 0.35; 'method': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'everybody': 0.60; 'subject:skip:S 10': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=aRc5rG5iEYcD2XsZTkMy4MaMLVaLQSBB19luDwzyj9w=; b=fiFyZnM/juRpO+rs/vjpbXQkfkXvuyIf/Jjl8EGTn/71ef79+Nk67yZh+UfJ7wdvIi SRxyIuRM5Z0VM+4erk8FWyxWNh5PcHtcdl7xrKC3dc78x8KPOy0xoiXm3D5gyINjWjRt TFfWBA2+9caUhya0uEgw0jtIq/21SfUa/tyUoyh2JiDQ4tv9YrzHaFlLiS7J03AknFrl e8UhRjPXluRByxaEtUe5Tp9bDVabON02TNPu8+53ULOvCAEc3Klq4ZVBlZBCn4qGzyst LNGpZqpVYW0kIr2VhOnWKMMh5N3AaJdIcm9v6W7V9FW5V7+8eZpQkljLVdFOF061hro2 5Duw==
MIME-Version 1.0
X-Received by 10.42.101.80 with SMTP id d16mr12028756ico.93.1374257315477; Fri, 19 Jul 2013 11:08:35 -0700 (PDT)
Sender skip.montanaro@gmail.com
In-Reply-To <ksbt1a$5q1$1@ger.gmane.org>
References <mailman.4865.1374240179.3114.python-list@python.org> <51e967bb$0$29971$c3e8da3$5496439d@news.astraweb.com> <ksbt1a$5q1$1@ger.gmane.org>
Date Fri, 19 Jul 2013 13:08:35 -0500
X-Google-Sender-Auth tFocRKA33a6ExrbWm5AZfTdv_u8
Subject Re: Find and Replace Simplification
From Skip Montanaro <skip@pobox.com>
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4883.1374257324.3114.python-list@python.org> (permalink)
Lines 7
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1374257324 news.xs4all.nl 15905 [2001:888:2000:d::a6]:57475
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:50919

Show key headers only | View raw


Serhiy> The string replace() method is fastest (at least in Python 3.3+). See
Serhiy> implementation of html.escape() etc.

I trust everybody knows by now that when you want to use regular
expressions you should shell out to Perl for the best performance. :-)

Skip

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-19 09:22 -0400
  Re: Find and Replace Simplification Novocastrian_Nomad <gregory.j.baker@gmail.com> - 2013-07-19 06:38 -0700
  Re: Find and Replace Simplification John Gordon <gordon@panix.com> - 2013-07-19 14:28 +0000
  Re: Find and Replace Simplification Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-19 16:22 +0000
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-19 20:29 +0300
    Re: Find and Replace Simplification Skip Montanaro <skip@pobox.com> - 2013-07-19 13:08 -0500
    Re: Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-19 17:44 -0400
    Re: Find and Replace Simplification Dave Angel <davea@davea.name> - 2013-07-19 18:45 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 12:16 +0100
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-20 14:48 +0300
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-20 14:57 +0300
    Re: Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 08:41 -0400
    Re: Find and Replace Simplification Devyn Collier Johnson <devyncjohnson@gmail.com> - 2013-07-20 08:50 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 18:03 +0100
    Re: Find and Replace Simplification Dave Angel <davea@davea.name> - 2013-07-20 14:04 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 19:37 +0100
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 19:41 +0100
    Re: Find and Replace Simplification Dave Angel <davea@davea.name> - 2013-07-20 17:56 -0400
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-20 23:33 +0100
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-21 10:44 +0300
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-21 12:29 +0100
    Re: Find and Replace Simplification Serhiy Storchaka <storchaka@gmail.com> - 2013-07-21 15:28 +0300
    Re: Find and Replace Simplification Joshua Landau <joshua@landau.ws> - 2013-07-21 13:49 +0100

csiph-web