ASP - classic asp substring, instr functions - Asked By asif hameed on 26-Jan-10 03:01 PM

Hi all,

I have a response from api. I am html encoding it and want to pick required info. Here is response:

Request Submitted


and when i html encode it

I get smething like



Request Submitted




Request Submitted


<a href=javascript.history.go(-1)> Continue </a>



I wan to get following from above html


Request Submitted


It can be different based on api response. Like server busy , server dwon. invalid request. How can i do this ? Do i need to use classic as string functions ( instr, substring etc)

Please suggest me.


Asif Hameed

classic asp substring, instr functions - Sakshi a replied to asif hameed on 26-Jan-10 11:29 PM


Dim sItem as String
sItem="This is my String"


Dim lg
lg=instr(1, sItem, "the")
response.Write (lg)

Thanks and Regards,

mv ark replied to asif hameed on 30-Jan-10 07:36 AM
VBScript supports Regular expressions. Use it to extract the desired portion of the complete string.

You can find related code here -