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


Groups > comp.lang.python > #97280

Re: Question about regular expression

Path csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.041
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'subject:Question': 0.05; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'subject:expression': 0.16; 'subject:regular': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; "skip:' 10": 0.28; 'cases': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'suggestion': 0.37; 'charset:us-ascii': 0.37; 'to:addr:python.org': 0.40; 'where': 0.40; 'space': 0.40; 'your': 0.60; 'more': 0.63; 'received:23': 0.84
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-MC-Relay Neutral
X-MailChannels-SenderId wwwh|x-authuser|tim@thechases.com
X-MailChannels-Auth-Id wwwh
X-MC-Loop-Signature 1443703251671:2276085850
X-MC-Ingress-Time 1443703251671
Date Thu, 1 Oct 2015 07:39:57 -0500
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Re: Question about regular expression
In-Reply-To <CANN3ufk8O1gBnmZ7ZAnGYjQNG56xwyuUNCqUz8VD350TUmuBSg@mail.gmail.com>
References <811788b6-9955-4dcc-bf49-9647891d17ec@googlegroups.com> <20150930142015.4045c931@bigbox.christie.dr> <muib0r$uhn$1@ger.gmane.org> <CANN3ufk8O1gBnmZ7ZAnGYjQNG56xwyuUNCqUz8VD350TUmuBSg@mail.gmail.com>
X-Mailer Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AuthUser tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.291.1443703705.28679.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1443703705 news.xs4all.nl 23843 [2001:888:2000:d::a6]:51831
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 2855
X-Received-Body-CRC 221515326
Xref csiph.com comp.lang.python:97280

Show key headers only | View raw


On 2015-10-01 01:48, gal kauffman wrote:
> items = s.replace(' (', '(').replace(', ',',').split()

s = "name1  (1)"

Your suggestion doesn't catch cases where more than one space can
occur before the paren.

-tkc


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


Thread

Question about regular expression massi_srb@msn.com - 2015-09-30 11:34 -0700
  Re: Question about regular expression Emile van Sebille <emile@fenx.com> - 2015-09-30 11:50 -0700
  Re: Question about regular expression Tim Chase <python.list@tim.thechases.com> - 2015-09-30 14:20 -0500
  Re: Question about regular expression Denis McMahon <denismfmcmahon@gmail.com> - 2015-09-30 23:30 +0000
    Re: Question about regular expression Denis McMahon <denismfmcmahon@gmail.com> - 2015-10-02 18:25 +0000
  Re: Question about regular expression Emile van Sebille <emile@fenx.com> - 2015-09-30 20:58 -0700
  Re: Question about regular expression Tim Chase <python.list@tim.thechases.com> - 2015-10-01 07:39 -0500
  Re: Question about regular expression Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-10-01 15:53 +0000
    Re: Question about regular expression Denis McMahon <denismfmcmahon@gmail.com> - 2015-10-01 21:41 +0000
  Re: Question about regular expression Denis McMahon <denismfmcmahon@gmail.com> - 2015-10-01 21:31 +0000

csiph-web