[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regexp for matching a symbol (identifier) in emacs-lisp
From: |
Nikolaj Schumacher |
Subject: |
Re: Regexp for matching a symbol (identifier) in emacs-lisp |
Date: |
Fri, 10 Oct 2008 20:22:56 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (darwin) |
"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.
regards,
Nikolaj Schumacher