Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Search for string with quotes in file (https://www.kinook.com/Forum/showthread.php?t=2617)

John Kerr 05-17-2007 12:19 PM

Search for string with quotes in file
 
I am looking for a way to create a conditional build step based upon a string search in a file. I have found the script expression [InStr(vbld_FSO().OpenTextFile("%FILE%").ReadAll(), "Some String") > 0 ] in the forum to use when "Build only if macro or expression" evaluates to true. However, the string I need to search for contains quotes. Can you help? I can't fiqure out how to escape the quotes in the script expression.

kinook 05-17-2007 01:53 PM

In VBScript, use two double quotes to insert a literal double quote character into a string:

"string containing a "" double quote"

"""string starting and ending with a double quote"""


All times are GMT -5. The time now is 10:03 AM.


Copyright © 1999-2023 Kinook Software, Inc.