Finding a substring

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

Finding a substring

Postby AdrianGray » Tue Jul 29, 2014 7:02 am

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

Postby FrancescoT » Tue Jul 29, 2014 11:04 am

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

Postby AdrianGray » Tue Jul 29, 2014 3:53 pm

Perfect, exactly what I was after.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Finding a substring

Postby FrancescoT » Wed Jul 30, 2014 11:11 am

: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


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 127 guests