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


Groups > comp.lang.python > #30780 > unrolled thread

Re: + in regular expression

Started byIan Kelly <ian.g.kelly@gmail.com>
First post2012-10-04 23:14 -0600
Last post2012-10-04 23:14 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: + in regular expression Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-04 23:14 -0600

#30780 — Re: + in regular expression

FromIan Kelly <ian.g.kelly@gmail.com>
Date2012-10-04 23:14 -0600
SubjectRe: + in regular expression
Message-ID<mailman.1837.1349414085.27098.python-list@python.org>
On Thu, Oct 4, 2012 at 9:44 PM, Saroo Jain <Saroo_Jain@infosys.com> wrote:
> x3=re.match("\s{6}+",str)
>
> instead use
> x3=re.match("\s{6,}",str)
>
> This serves the purpose. And also give some food for thought for why the first one throws an error.

That matches six or more spaces, not multiples of six spaces.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web