[Top][All Lists]

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

Re: regex-opt does not accept 'symbol as second arg?

From: Lennart Borgman
Subject: Re: regex-opt does not accept 'symbol as second arg?
Date: Sat, 11 Oct 2008 14:20:04 +0200

On Sat, Oct 11, 2008 at 2:10 PM, Nikolaj Schumacher <address@hidden> wrote:
> "Lennart Borgman" <address@hidden> wrote:
>> On Sat, Oct 11, 2008 at 12:02 PM, Xah <address@hidden> wrote:
>>> the regexp-opt accept a second argument of "'word", but it doesn't
>>> accept "'symbol"?
>>> Shouldn't it?
> Sure, why not.
>> Would not the semantics be exactly the same?
> No, "\\<\\(\\w\\|\\s_+\\)+" (word delimiters) doesn't match the entire
> lisp symbol `-test'.

Ok, I see. There is \\_< for symbols, I never noticed that (I thought
that must be handled in the syntax table).

Then I think Xah is right.

>> But one thing I think would be useful is to be able to use numbers for
>> the PAREN argument to get an explicitly numbered regexp group back.
> Is it possible to modify the numbering at all?  If so, how?

See (info "(elisp) Regexp Backslash")

   `\(?NUM: ... \)'
         is the "explicitly numbered group" construct.

> regards,
> Nikolaj Schumacher

reply via email to

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