by RegX (15 Submissions)
Category: Internet/HTML
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating:
(7 Votes)

Highlights HTML and XML properly
You can Highlight all text or just selected text and highlights syntax as you type.
Will parse standard size files 10-60k instantly
500k files in about 6 seconds.
Now you can easily change the colors thanks to
M.Bartlema
A much faster version is on the way!
By the way, If you are wondering why this highlighter is so much faster and supports syntax better than most post here the answer is Regular Expressions. M.Bartlema was able to speed his code up 3 times by replacing a single VBReplace with a regExp. His code is currently faster than mine by the way.
We hope to post a regExp tutorial in the near future that will blow your minds in two ways.
1. A single regExp can replace a lot of code
2. They scream!!!
A small example? ok this regEx replace highlights all HTML tags one color.
tmpstr = ReplaceText("(<[^>]+>)", "\plain\f2\fs17\cf1 $1\plain\f2\fs17\cf0 ", tmpstr)
Of course this assumes that you have a color table in the rtf with 2 colors.
Any other way is a waste of time - literally!
Assumes
' Needs reference to Microsoft VBscript Regular Expressions.
' Get it at http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/msdn-files/027/001/733/msdncompositedoc.xml
Side Effects
astonishment, amazement, and an uncontrollable urge to learn Regular Expressions in VB.
Download FastHTML/XML Highlight (26 KB)