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


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

Re: Re: + in regular expression

Started byEvan Driscoll <driscoll@cs.wisc.edu>
First post2012-10-04 21:25 -0500
Last post2012-10-04 21:25 -0500
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: Re: + in regular expression Evan Driscoll <driscoll@cs.wisc.edu> - 2012-10-04 21:25 -0500

#30775 — Re: Re: + in regular expression

FromEvan Driscoll <driscoll@cs.wisc.edu>
Date2012-10-04 21:25 -0500
SubjectRe: Re: + in regular expression
Message-ID<mailman.1833.1349404871.27098.python-list@python.org>
On 10/04/2012 04:59 PM, Mark Lawrence wrote:
>> why the  "\s{6}+"  is not a regular pattern?
>>
>>
>>
>
>
> Why are you too lazy to do any research before posting a question?
>
Errr... what?

I'm only somewhat familiar with the extra stuff that languages provide 
in their regexs beyond true regular expressions and simple extensions, 
but I was surprised to see the question because I too would have 
expected that to work. (And match any sequence of whitespace characters 
whose length is a multiple of six.) I reskimmed the documentation of the 
re module and didn't see anything that would prohibit it. I looked at 
several of the results of a Google search for the multiple repeat error, 
and didn't really find any explanation beyond "because you can't do it" 
or "here's a regex that works." (Well, OK, I did see a mention of + 
being a possessive quantifier which Python doesn't support. But that 
still doesn't explain why my expectation isn't what happened.)

In what way is that an unreasonable question?

Evan

[toc] | [standalone]


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


csiph-web