Search Tools Links Login

FastHTML/XML Highlight


Visual Basic 6, or VB Classic

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("(<[^>]+>)", "plainf2fs17cf1 $1plainf2fs17cf0 ", 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!

Original Author: RegX

Assumptions

' 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.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 276 times

Categories

Visual Basic 6

Attachments

FastHTML_X325111112001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 27,568 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.