Me llamareis pesao ya con tanta cadena, pero bueno...

Esta funcion lo que hace es limpiar el Html de <strong>, <b>(entre otros)...
De esta forma es mas facil trabajar con la cadena, utilizo este metodo mientras aprendo ExprReg...

Código
Un ejemplo, tengo esto:
' //////////////////////////////////////////////////////////////// ' // *Autor: *PsYkE1* (miguelin.majo@gmail.com) // ' // *Podeis agrandar o reducir el codigo, siempre y cuando se // ' // respete la autoria y se me comuniquen esos cambios. // ' // *Visita http://foro.rthacker.net // ' //////////////////////////////////////////////////////////////// Option Explicit Private Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ByVal cChar As Byte) As Long Public Function Clean_Html_Code(ByVal sHtmlCode As String) As String Const ValidSymbolChars As String = ",.?¿!¡=+-*Ç""_:%$·/|\ºª@ " Const StartInvalidString As String = "<{[(&" Const StopInvalidString As String = ">}];" Dim sActualChar As String * 1 Dim bIgnoreString As Boolean Dim lTotalChar As Long Dim x As Long Dim y As Long lTotalChar = Len(sHtmlCode) If lTotalChar > 0 Then For x = 1 To lTotalChar sActualChar = Mid$(sHtmlCode, x, 1) If InStr(StartInvalidString, sActualChar) <> 0 Then bIgnoreString = True If bIgnoreString = False Then If IsCharAlphaNumeric(Asc(sActualChar)) Or InStr(ValidSymbolChars, sActualChar) <> 0 Then Clean_Html_Code = Clean_Html_Code & sActualChar End If End If If InStr(StopInvalidString, sActualChar) <> 0 Then bIgnoreString = False Next Do Until InStr(1, Clean_Html_Code, " ") = 0 Clean_Html_Code = Replace$(Clean_Html_Code, " ", " ") DoEvents Loop End If End Function
Citar
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>Crear nuevo tema</td>
Hago la llamada asi(suponiendo que sData es el String donde tengo almacenado el codigo Html):<tr class="titlebg">
<td>Crear nuevo tema</td>
Código
La funcion me devuelve esto:
sData = Clean_Html_Code(sData)
Citar
Crear nuevo tema
Si veis cualquier cosa mal o que se pueda mejorar, decirmela!

Espero que os haya gustado!

Salu2!
