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
 
Back
Top