Function to strip HTML codes from a field during load script

    This function is called from the load script.

     

    Example:

    Load field1,

            stripHTML(field2) as field2

    from hasHTMLCode.qvd(qvd);

    Function stripHTML(strHTML)
       Dim objRegExp, strOutput
      Set objRegExp = New Regexp
      objRegExp.IgnoreCase = True
      objRegExp.Global = True
      objRegExp.Pattern = "(?:<style.+?>.+?</style>|<script.+?>.+?</script>|<(?:!|/?[a-zA-Z]+).*?/?>)"
      'Replace all HTML tag matches with the empty string
      strOutput = objRegExp.Replace(strHTML, "")
      stripHTML = strOutput 'Return the value of strOutput
      Set objRegExp = Nothing
    End Function