InStr when the string contains "

Advanced programming using WinTask scripting language

InStr when the string contains "

Postby Walt on Thu Sep 18, 2014 3:52 pm

I need to find if in a source web page this string is there or not:
<td colspan=”2”>No matching claims found.</td>
But as the string contains "2", the InStr syntax below is not accepted:
InStr(pageSource$,"<td colspan=”2”>No matching claims found.</td>")

How can I use inStr when the string contains " ?
Posts: 13
Joined: Fri Dec 24, 2004 10:44 am

Re: InStr when the string contains "

Postby TechSupport on Fri Sep 19, 2014 7:08 am

As “ is used as separator for strings, it’s a bit tricky. You have to replacethe " character by chr$(34), I made it step by step:
b$="<td colspan="
c$=b$+chr$(34)+"2"+chr$(34)+">No matching claims found.</td>"

WinTask Tech Support
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am

Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 1 guest