Josep M. Fontana wrote:
Just one more question. You say that \w means alphanumeric, not just
alpha. Is there any expression that would mean "just alpha" and (given
the appropriate LOCALE setting) would match 'a' and 'ö' but not '9'?
Unfortunately, I don't think there is a standard code for jus
Josep M. Fontana wrote:
Sorry! Sorry! Sorry! I just found out this question had already been
answered by Steven D'Aprano in another thread! The trick was to add
'\w' besides [a-zA-Z].
Hah ha! I didn't see this before I answered... I thought the question
sounded familiar :)
--
Steven
Hi Steven,
On Thu, Dec 23, 2010 at 11:51 AM, Steven D'Aprano wrote:
> Note also that \w means alphanumeric, not just alpha, so it will also match
> digits.
I'm sorry you didn't get to read my next message because in there I
said that you yourself had already solved my problem a few weeks ago.
Josep M. Fontana wrote:
I am working with texts that are encoded as ISO-8859-1. I have
included the following two lines at the beginning of my python script:
!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
If I'm not mistaken, this should tell Python that accented characters
such as 'á', 'Á',
Sorry! Sorry! Sorry! I just found out this question had already been
answered by Steven D'Aprano in another thread! The trick was to add
'\w' besides [a-zA-Z].
Please, accept my apologies. I devote time to this project whenever I
have some free time. I got very busy with other things at some point
I am working with texts that are encoded as ISO-8859-1. I have
included the following two lines at the beginning of my python script:
!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
If I'm not mistaken, this should tell Python that accented characters
such as 'á', 'Á', 'ö' or 'è' should be cons