Page 1 of 1

Finding a substring

Posted: Tue Jul 29, 2014 7:02 am
by AdrianGray
I am looking for the best way to find if a substring exists. I have read in an XML file to a variable $XMLFile$. I have another file with a series of keys. I was planning to scan the $XMLFIle$ for each key using a while not EOF loop. Parse String does not appear to provide a FOUND type value. If not found, will Parse String always put the entire sting in the "Variable for Second Part" and Leave the "Variable for First Part" blank? Thanks, Adrian.

Re: Finding a substring

Posted: Tue Jul 29, 2014 11:04 am
by FrancescoT
Dear Adrian,

Did you try with using the IF statement along the "Contains" comparison option?

The sample below checks if MYVARIABLE contains "/update";

if Variable MYVARIABLE Contains /update
end


Regards

Re: Finding a substring

Posted: Tue Jul 29, 2014 3:53 pm
by AdrianGray
Perfect, exactly what I was after.

Re: Finding a substring

Posted: Wed Jul 30, 2014 11:11 am
by FrancescoT
:D