Remove Microsoft Word formating (in html doc) - regular expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an html document created through MS Word (save as html).

I would like to find a regular expression that can be used to remove all of
the formatting. Any help would be greatly appreciated.
thx
dave
 
A single expression? That would be pretty darned difficult.

Perhaps a series of transformations, where each one applied an expression
and returned a slightly "better" stream of text than the one before it.
After going through them in sequence, you may get there.

In the past, I've seen folks go at it the other way: to write a simple
engine that would evaluate the stream as though it was a browser, allowing
the simple tags, and replacing the complex ones with simpler ones. I dont'
know if that was better or not, but it worked.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Back
Top