[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 |
Subject: |
Re: Regexp for matching a symbol (identifier) in emacs-lisp |
Date: |
Fri, 10 Oct 2008 20:25:16 +0200 |
On Fri, Oct 10, 2008 at 8:22 PM, Nikolaj Schumacher <me@nschum.de> wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> wrote:
>
>> Nordlöw wrote:
>>> Does Emacs provide a shorter way of matching an emacs-lisp symbol
>>> (identifier) than the following:
>>> "\\(" "\\(?:" "\\w\\|\\s_" "\\)+" "\\)"
>>
>>
>> You do not need two level of parenthesis. Use either the shy group or
>> the submatch group type parenthesis.
>
> He needs two if he wants to match the entire symbol in a matching group,
> though.
Yes, my bad.