Regular Expression for words (with umlauts, without numbers)

  • Thread starter Jens Lechtenboerger
  • Start date
J

Jens Lechtenboerger

Dear experts,

I'm looking for a regular expression to recognize natural language
words with umlauts but without numbers. While \w with re.U does
recognize words with umlauts, it also matches numbers, which I do
not want.

Is there a better way than an exhaustive enumeration such as
[-a-zàáâãäåæ...]?

I guess there should be a better way as \w appears to know about
alphabetical characters...

Thanks in advance
Jens
 
J

Jens Lechtenboerger

Jens said:
I'm looking for a regular expression to recognize natural language
words with umlauts but without numbers. While \w with re.U does
recognize words with umlauts, it also matches numbers, which I do
not want.

Is there a better way than an exhaustive enumeration such as
[-a-zàáâãäåæ...]?

I guess there should be a better way as \w appears to know about
alphabetical characters...

How about [^\W\d] ?

Brilliant.

Thanks
Jens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top