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 16:22:36 +0100

That's brilliant.

The only thing is...

This example isn't highlighted:

aPDU-rose : invoke : {
  invokeID 5,
  operationValue local : 71,
  argument {
    monitorObject device : dialingNumber : "401"
  }
}

or this one:

aPDU-rose : retResult : {
  invokeID 2,
  operValue {
    operationValue local : 71,
    result {
      crossRefIdentifier '40 3f'H
    }
  }
}

Any ideas why?

What is [^\\000] ?


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]