Format string help

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

I need some help with formatting this string.

Input: asfbsdfsd<time>June 12, 2003</time>blah blah

I need to filter out everything outside the tags. so the output would be.

output:June 12, 2003

can someone help me write a function?


thanks in advance

Aaron
 
Aaron,
I do not know if you mean this or another solution.
\\\\\\\\\\\
Dim a As String = "Input: asfbsdfsd<time>June 12, 2003</time>blah blah"
Dim result As String = a.Substring(a.IndexOf("<time>") + 6,
(a.IndexOf("</time>") - a.IndexOf("<time>") - 6))
////////////
Cor
 
Hello,

Aaron said:
Input: asfbsdfsd<time>June 12, 2003</time>blah blah

I need to filter out everything outside the tags. so the output would be.

output:June 12, 2003

Check the regular expressions chapter of the documentation.

Regards,
Herfried K. Wagner
 

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