nbst

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

Guest

Hi All,

I have downloaded a file from Http and what putting it in Excel and am
getting a strange format. The format looks like nbst;
How can I remove this format?

Thanks in advance.
Aaron
 
Hey Aaron,
not quit sure what NBST is unless ur talking about &nbsp which is a
blank in html
html isn't the most entertaining format to work with.
you'll need to pull the tags out of it
you could usr something like to get each lexime you don't want:

sSource = 'the HTML source
sNew = replace(sSource, "&nbsp", " ")

or you could use a regular expression to find each tag and repace it
like:

Dim regEx As RegExp
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.MultiLine = True
regEx.Global = True
regEx.Pattern = "[<].*[>]"

RetStr = regEx.Replace(sSource, " " )

the problem here is it kills all the formating in the page, unless that
doesn't matter then who cares ;)

hope this helps
 
I noticed that that pattern is going to cause you problems.
you'll want it to be the smallest matching string
so something like
"[<]([^<])*[>]"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top