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


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

Re: how to right the regular expression ?

Started byMRAB <python@mrabarnett.plus.com>
First post2013-02-15 01:26 +0000
Last post2013-02-15 01:26 +0000
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: how to right the regular expression ? MRAB <python@mrabarnett.plus.com> - 2013-02-15 01:26 +0000

#38899 — Re: how to right the regular expression ?

FromMRAB <python@mrabarnett.plus.com>
Date2013-02-15 01:26 +0000
SubjectRe: how to right the regular expression ?
Message-ID<mailman.1793.1360891607.2939.python-list@python.org>
On 2013-02-15 00:32, python wrote:
> the regex--- pat = r'([a-z].+?\s)(.+?)((\(.+\)))?$' ,do not work at all.
>
[snip]
Sorry, that should be:

pat1 = r'([a-z].+?\s)(.+?)((\(.+\)))?$'

Group 2 should've been lazy "(.+?)", and because of that it should've
forced matching the end of the line with "$".

[toc] | [standalone]


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


csiph-web