[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
Re: OT: Javascript Reg's -> ASP.NET to clean MSWord HTML
- To: ukha_d@xxxxxxx
- Subject: Re: OT: Javascript Reg's -> ASP.NET to clean
MSWord HTML
- From: "Chris Bond" <chris@xxxxxxx>
- Date: Wed, 28 Jan 2004 17:03:17 -0000
- Mailing-list: list ukha_d@yahoogroups.com; contact
ukha_d-owner@xxxxxxx
- Reply-to: ukha_d@xxxxxxx
> What does your VB.Net code look like now?
>
> If you are just looking for "/<\?xml[^>]*>/ig" and
replacing it
with "",
> then this should work, but it looks like the js replace routine
uses
> Perl-like parsing syntax, which I'm not familiar with...
Private Function CleanHtml(ByVal strHtml As String) As String
Dim strTemp As String
strTemp = Regex.Replace(strHtml, "/<\?xml[^>]*>/ig",
"")
strTemp = Regex.Replace(strTemp,
"/<\/?[a-z]+:[^>]*>/ig", "")
'// Missing 1
'// Missing 2
strTemp = Regex.Replace(strTemp,
"/<span[^>]*><\/span[^>]
*>/ig", "")
strTemp = Regex.Replace(strTemp,
"/<span[^>]*><\/span[^>]
*>/ig", "")
strTemp = Regex.Replace
(strTemp, "/<span><span>/ig",
"<span>")
strTemp = Regex.Replace
(strTemp, "/<\/span><\/span>/ig",
"</span>")
Return strTemp
End Function
Oblessly that isnt working properly though.
UK Home Automation Meet 2004 - BOOK NOW!
http://www.ukha2004.com
http://www.automatedhome.co.uk
Post message: ukha_d@yahoogroups.com
Subscribe: ukha_d-subscribe@yahoogroups.com
Unsubscribe: ukha_d-unsubscribe@yahoogroups.com
List owner: ukha_d-owner@yahoogroups.com
Home |
Main Index |
Thread Index
|