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


Groups > comp.lang.python > #10748

Re: How to define repeated string when using the re module?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.mixmin.net!news2.arglkargh.de!news.wiretrip.org!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:module': 0.04; 'subject:using': 0.04; 'character,': 0.07; 'subject:when': 0.07; 'python': 0.08; 'done?': 0.09; 'from:addr:python': 0.09; 'subject:string': 0.09; 'wrote:': 0.15; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'reply- to:addr:python-list': 0.16; 'subject:define': 0.16; 'working?': 0.16; 'work,': 0.20; 'seems': 0.20; 'header:In-Reply-To:1': 0.22; 'string': 0.26; 'received:84': 0.28; 'subject:?': 0.31; 'to:addr :python-list': 0.34; 'header:User-Agent:1': 0.34; 'reply- to:addr:python.org': 0.35; 'define': 0.35; 'subject:How': 0.36; 'using': 0.37; 'subject:: ': 0.38; 'think': 0.38; 'should': 0.39; 'to:addr:python.org': 0.39; 'header:Reply-To:1': 0.71; 'reply- to:no real name:2**0': 0.72
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result AkUHALgvOE7Unw4U/2dsb2JhbABCmFOPEneBQAEBBThAEQsIEAkWDwkDAgECAUUTCAEBh2rAJIZCBJgCi14
Date Tue, 02 Aug 2011 18:15:16 +0100
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version 1.0
To python-list@python.org
Subject Re: How to define repeated string when using the re module?
References <CAN1FwxcUv4m6nomM5bVPogiL-2_2czUwm1oCwVXsg2pRUsH5RQ@mail.gmail.com>
In-Reply-To <CAN1FwxcUv4m6nomM5bVPogiL-2_2czUwm1oCwVXsg2pRUsH5RQ@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To python-list@python.org
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.1790.1312305324.1164.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312305324 news.xs4all.nl 23980 [2001:888:2000:d::a6]:51738
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10748

Show key headers only | View raw


On 02/08/2011 17:20, smith jack wrote:
> if it's for a single character, this should be very easy, such as
> c{m,n}   the occurrence of c is between m and n,
>
> if i want to define the occurrence of (.*?)</div>   how should make it
> done?  ((.*?)</div>){1,3}  seems not work, any method to define repeat
> string using python regex?

Why do you think it's not working?

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


Thread

Re: How to define repeated string when using the re module? MRAB <python@mrabarnett.plus.com> - 2011-08-02 18:15 +0100

csiph-web