Aug 24 2004

Syntax Highlighter

Published by at 5:58 pm under .NET,Programming

This is an old article and the information contained within it may be out of date, not reflect my current views and/or contain broken links. If you feel this article is still valid and requires updating, you can use the contact form to let me know. However, I make no guarantee that it will get updated.

I’ve been trying to find a good customisable Syntax Highlighter for use in a VB.NET project. The highlighter HAS to be able to highlight PHP.

I’ve been trawling through Google for sometime now and have only been able to find commercial solutions (

The only open source solution that I have been able to find is at This solution is a wrapper for the Richtextbox that comes as a standard .NET control and uses regular expressions to identify the code to highlight. The only problem with this solution is that it isn’t able to handle syntax highlighting over several lines. Whilst this isn’t a problem whilst highlighting VB code, as soon as you try and highlight a comment or a quoted string that runs over several lines (as in PHP), it falls over. This is because this solution highlights one line at a time and isn’t, therefore, capable of doing multi-line highlighting.

I found a post at that at first glance seemed promising, but one again I was face with the same dead end.

I guess I just have to keep looking…

[Listening to: (2004/Aug/19) ( - Headphone Jack @ - (0:-1)]

No responses yet