* \w does not work in a range
@ 2009-04-10 20:35 Decebal
2009-04-10 22:39 ` harven
0 siblings, 1 reply; 3+ messages in thread
From: Decebal @ 2009-04-10 20:35 UTC (permalink / raw
To: help-gnu-emacs
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: \w does not work in a range
2009-04-10 20:35 \w does not work in a range Decebal
@ 2009-04-10 22:39 ` harven
2009-04-11 10:44 ` Decebal
0 siblings, 1 reply; 3+ messages in thread
From: harven @ 2009-04-10 22:39 UTC (permalink / raw
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: \w does not work in a range
2009-04-10 22:39 ` harven
@ 2009-04-11 10:44 ` Decebal
0 siblings, 0 replies; 3+ messages in thread
From: Decebal @ 2009-04-11 10:44 UTC (permalink / raw
To: help-gnu-emacs
On Apr 11, 12:39 am, harven <har...@free.fr> wrote:
> Decebal <CLDWester...@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.2http://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Char-Cl...
Thanks, I'll do that.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-11 10:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10 20:35 \w does not work in a range Decebal
2009-04-10 22:39 ` harven
2009-04-11 10:44 ` Decebal
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.