Finding a substring

Got a problem you cannot solve? Try here.
Post Reply
AdrianGray
Posts: 32
Joined: Fri Jul 25, 2014 5:21 am

Finding a substring

Post 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.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Finding a substring

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
AdrianGray
Posts: 32
Joined: Fri Jul 25, 2014 5:21 am

Re: Finding a substring

Post by AdrianGray »

Perfect, exactly what I was after.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Finding a substring

Post by FrancescoT »

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply