Nedit -- Wrap: Inline Streams

Waring, Steve (Central-Networks) steve.waring at central-networks.co.uk
Tue Jun 5 17:46:21 CEST 2007


Quoting Tony Balinski [ajbj at free.fr]

		I adapted my shell SH rules to allow for this, but my
solution isn't ideal.
		I have a pattern called "inline stream" which is
included after "double quoted escape"; it's Pass 1, "Highlight text
matching regular expression":
		  \<\<-?\s*(\w+>)\s*\n((.*\n)*?)(\t*\1)\s*$
		which, as you can see, will match multiple lines,
something to be avoided with SH REs. I set the context requirement to 3
lines, so sometimes the highlighting will get lost while editing (the
reason this practice isn't recommended). The parenthesised expressions
\1, \2 and \4 can be used to highlight the start marker, the content and
the end marker (same as the start
		marker) in separate "coloring for sub-expressions" SH
rules.

		In a similar way I have "improved" case/esac
recognition, which also has a fragile relationship with the context
length.

I have tried Tony's suggestion for the problem with a quote within an
inline stream, and it works fine. Tony, can you share your suggestion
for improving case/esac please?

Steve Waring
Central Networks UK
*02476 186418
*07879844448
Steve.Waring at central-networks.co.uk
http://www.eon.com/
http://www.central-networks.co.uk/


___________________________ Disclaimer Notice ____________________
This message and any attachments are confidential and should only
be read by those to whom they are addressed. If you are not the
intended recipient, please contact us, delete the message from your
computer and destroy any copies. Any distribution or copying without
our prior permission is prohibited.

Internet communications are not always secure and therefore the
E.ON Group does not accept legal responsibility for this message.
The recipient is responsible for verifying its authenticity before
acting on the contents. Any views or opinions presented are solely
those of the author and do not necessarily
represent those of the E.ON Group.

E.ON UK plc, Westwood Way, Westwood Business Park,
Coventry, CV4 8LG.
Registered in England & Wales No. 2366970

E.ON UK Trading Ltd, Westwood Way, Westwood Business Park,
Coventry, CV4 8LG
Registered in England & Wales No. 4178314

E.ON UK Trading Ltd is authorised and regulated by the Financial Services
Authority to carry out energy investment activities.

Telephone +44 (0) 2476 42 4000
Fax +44 (0) 2476 42 5432


More information about the Discuss mailing list