With a Function, how can I get rid of formating codes like <di
Ron,
You're getting closer. However, the & HTML codes need to be replaced, not
stripped.
&(amper)nbsp = " " (space)
&(amper)amp = & (and)
--
Thanks, Kevin
"Ron Rosenfeld" wrote:
On Mon, 1 Jun 2009 17:49:00 -0700, AFSSkier
wrote:
Ron,
The amp and nbsp are HTML amper codes. How do you remove them?
Original Data (my comments):
<div<font face=Arial size=2 color="#006666"THE (5/31)6-3 FOR VERSION 2 & 3
ARE READY FOR ON & amp ;(<=no spaces after amper) OFF REPORTS </font</div
<div & nbsp ;(<=no spaces after amper) </div
UDF Result (it's only stripping the none printable characters):
THE (5/31)6-3 FOR VERSION 2 amp; 3 ARE READY FOR ON amp; OFF REPORTS nbsp;
Result needed:
THE (5/31)6-3 FOR VERSION 2 and 3 ARE READY FOR ON and OFF REPORTS.
Slight change to my last Pattern after seeing this example and your results:
re.Pattern = "<[^<]+|[\r\n]|&[^&;]+;"
--ron
|