Fernando Cabral
2017-07-05 01:16:32 UTC
I have been trying something like *poder[^[:alpha:]* so I could find the
word "poder " ("poder" followed by an space) but not "poderão" ("ã" being
an alpha character in Portuguese.)
In English it could be like finding "power" but not "powerless".
Problem is that it seems [^[alpha]] includes accented characters like "á",
"é", "ã".
That is, accented characters are not understood as alpha, but not alpha.
Please, note that I have compiled it with the UTF8 flag:
* re.Compile(poder[^[:alpha]], RegExp.utf8)*
Any hints?
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: ***@gmail.com
Facebook: ***@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
word "poder " ("poder" followed by an space) but not "poderão" ("ã" being
an alpha character in Portuguese.)
In English it could be like finding "power" but not "powerless".
Problem is that it seems [^[alpha]] includes accented characters like "á",
"é", "ã".
That is, accented characters are not understood as alpha, but not alpha.
Please, note that I have compiled it with the UTF8 flag:
* re.Compile(poder[^[:alpha]], RegExp.utf8)*
Any hints?
- fernando
--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: ***@gmail.com
Facebook: ***@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype: fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868
Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.