Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5314 > unrolled thread
| Started by | MRAB <python@mrabarnett.plus.com> |
|---|---|
| First post | 2011-05-13 18:34 +0100 |
| Last post | 2011-05-13 18:34 +0100 |
| 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: Regular Expression for words (with umlauts, without numbers) MRAB <python@mrabarnett.plus.com> - 2011-05-13 18:34 +0100
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2011-05-13 18:34 +0100 |
| Subject | Re: Regular Expression for words (with umlauts, without numbers) |
| Message-ID | <mailman.1520.1305308103.9059.python-list@python.org> |
On 13/05/2011 17:14, Tim Chon wrote:
> Hallo Jens,
>
> In current python re module, you have to do something like:
>
> ((?!\d|_\w)+ which uses the negative look ahead to grab all words except
> integers and underscore. Of course, if you turn on the unicode flag re.U
> or use it inline like, (?u) then this will grab your desired umlauts.
>
> I'd actually recommend, however, that if you have an extra 20 minutes,
> to use Regexp 2.7:
> http://bugs.python.org/issue2636
>
> Its a much needed improvement over F.Lundh's re implementation (from
> 1999!) and its 40% faster. Moreover, you can do exactly what you are
> requesting like so,
>
> (?u)[[:alpha:]]+
>
The latest release is here:
http://pypi.python.org/pypi/regex
Back to top | Article view | comp.lang.python
csiph-web