[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \w does not work in a range
From: |
harven |
Subject: |
Re: \w does not work in a range |
Date: |
Sat, 11 Apr 2009 00:39:50 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) |
Decebal <CLDWesterhof@gmail.com> writes:
> I would like to define a regulair expression like [\w\-]+, but the \w
> seems not to work inside the [ and ]. Is this true, or do I need to do
> something special?
use [[:word:]\-]+ instead.
see the elisp manual, section character classes 34.3.1.2
http://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Char-Classes