On 12 Apr., 02:31, "Mark Tolonen" <[email protected]> wrote:
> "Andreas" <[email protected]> wrote in message
>
> news:[email protected]...
>
> > Hello,
>
> > I'd like to create a regex that captures any unicode character, but
> > not the underscore and the digits 0-9. "^(?u)\w$" captures them also.
> > Is there a possibility to restrict an expression like "\w" to "\w
> > without [0-9_]"?
>
> '(?u)[^\W0-9_]' removes 0-9_ from \w.
>
> -Mark

Hello Mark,

haven't tried it yet, but it looks good!
@John: Sorry for being imprecise, I meant *letters*, not *characters*,
so requirement 2 fits my needs.

Regards,
Andreas
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to