Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Regular Expression for words (with umlauts, without numbers)

Reply
Thread Tools

Regular Expression for words (with umlauts, without numbers)

 
 
Jens Lechtenboerger
Guest
Posts: n/a
 
      05-13-2011
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
 
Reply With Quote
 
 
 
 
Jens Lechtenboerger
Guest
Posts: n/a
 
      05-13-2011
On 2011-05-13, Peter Otten wrote:

> Jens Lechtenboerger wrote:
>
>> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular expression for matching words containing underscore _character Raj Perl Misc 5 12-13-2007 10:11 AM
Regular expression to match only strings NOT containing particular words Dylan Nicholson Perl Misc 6 10-19-2007 02:33 PM
Non-noise words are incorrectly recognised as noise words. Peter Striman ASP .Net 1 08-23-2005 01:26 PM
regular expression for english words rahul Perl Misc 12 05-12-2005 08:41 PM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM



Advertisments