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

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

Re: regexp problem


From: Þorne
Subject: Re: regexp problem
Date: 12 Aug 2006 02:46:33 -0700
User-agent: G2/0.2

Pascal Bourguignon wrote:
> You can match groups:
>
> a\(b\)c
>
> so the match number 0 is the whole regexp: abc
> but the match number 1 is only b

Sorry to be dense, but do you mean something like this:

(search-forward-regexp "a\\(b\\)c\\0")

because i can't get anything like it to work.  I don't really follow
the documentation for the \<digit> construct in regexps at all...

In fact the code above finds a string that looks like `abc0' instead of
just `b'.

Specifically i am trying to make a regexp for define-generic-mode to
colorize the string`*' but only if it is in a string that looks like
`(*)'.  But not colorize the surrounding parens.



reply via email to

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