Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30775 > unrolled thread
| Started by | Evan Driscoll <driscoll@cs.wisc.edu> |
|---|---|
| First post | 2012-10-04 21:25 -0500 |
| Last post | 2012-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.
Re: Re: + in regular expression Evan Driscoll <driscoll@cs.wisc.edu> - 2012-10-04 21:25 -0500
| From | Evan Driscoll <driscoll@cs.wisc.edu> |
|---|---|
| Date | 2012-10-04 21:25 -0500 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web