help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regexp for matching a symbol (identifier) in emacs-lisp


From: Lennart Borgman (gmail)
Subject: Re: Regexp for matching a symbol (identifier) in emacs-lisp
Date: Fri, 10 Oct 2008 17:19:26 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Nordlöw wrote:
> Does Emacs provide a shorter way of matching an emacs-lisp symbol
> (identifier) than the following:
>   "\\(" "\\(?:" "\\w\\|\\s_" "\\)+" "\\)"


You mean the concatenation of those strings? (BTW, if you want to make
it easier to read then rx is an alternative.)

You do not need two level of parenthesis. Use either the shy group or
the submatch group type parenthesis.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]