>I am trying to find vars and their values in a string, and am having a hassle with similar var names. The vars are not all constantly in the string - in other words, it's a mixture of the vars, and I have to test to see what vars are in the particular string.
>
>If the string has Var1 and Var10 in it, and I test using $, I get a hit on both, but in the example string below, only Var10 is there
>
>VarString= "Var2=cd, Var3=ef, Var4=gh, Var5=ij, Var6=kl, Var7=mn, Var8=op, Var9=qr, Var10=st"
>
>If I use TestVar $ VarString and in that string it has Var10, for example, I will get a hit when testing for TestVar="Var10" as well as when TestVar="Var1".
>
>How do I eliminate this ambiguity?
>
>I hope I explained that clearly enough...
If you want to eliminate this problem at the source, you could rename your variables to Var01, Var02, ...
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up