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

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

Re: How to highlight-regexp across multiple lines


From: Angus Comber
Subject: Re: How to highlight-regexp across multiple lines
Date: Thu, 3 Apr 2014 18:24:56 +0100

It seems that it matches the aPDU messages provided there is no 0 in the
text.  I am puzzled by the [^\\000] - where can I find documentation on it?

Is it not null or something like that?  But then why does it not capture
string "0"?


On 3 April 2014 16:08, Thorsten Jolitz <tjolitz@gmail.com> wrote:

> Angus Comber <anguscomber@gmail.com> writes:
>
> > I was looking at this question on stackoverflow and it seems regex can
> > select across multiple lines generally but how would I do so for
> > highlight-regexp in emacs?
> >
> >
> http://stackoverflow.com/questions/159118/how-do-i-match-any-character-across-multiple-lines-in-a-regular-expression
> >
> >
> > Eg I want to highlight ALL text from aPDU... to the final closing brace:
> >
> > aPDU-rose : retResult : {
> >   invokeID 2,
> >   operValue {
> >     operationValue local : 71,
> >     result {
> >       crossRefIdentifier '40 3f'H
> >     }
> >   }
> > }
> >
> >
> > How would I do that using highlight-regexp?
> >
> > highlight-regexp aPDU-rose.* hi-yellow  would get me the first line - but
> > how to get everything including last } character?
>
> This regexp did match the aPDU in the gnus *Article* buffer:
>
> ,--------------------
> | "^aPDU[^\\000]+[}]+?$"
> `--------------------
>
> --
> cheers,
> Thorsten
>
>
>


reply via email to

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