Matching a Variable within a string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Matching a Variable within a string

Jonathan
I was wondering if it is possible to either directly or indirectly match a declared variable (also a string) within a string using Macro Language. Here what I would like to do:

dir = getDirectory("Choose Directory ");
list = getFileList(dir);
for (i=0; i<list.length; i++)
    {
     if(matches(list[i], ".*[variable].*"))
     statements();
     }

Is this doable? Or is there another approach that I sould try?

Thanks