.search JS method seems to want a string literal not a variable…
for (app in Servers)
{
the_name = Servers [app]["Name"];
the_app = Servers [app]["App Name"];
search_str = "/"+Name+"/";
hit = the_app.search(search_str);
if (the_name == Name || the_app == "Foo Bar" )
{
result.Index = app;
}
}
I want to generate a hit for a set of Apps that have a common Word for e.g. Name = "Skittles" will hit on Apps where app_name == "Skittles 1.0"; "Skittles 1.5"; "Skittles 3.2 — The Deluxe Edition 3.2"; etc etc
Name is a user definable variable. Servers is an object made available to me that lists video servers I can stream from running on my machine, each item in Servers will correspond to a server and have a "Name" item and a "App Name" item in it's object. (It's Syphon thing this is not an HTML/web context).
Should I look at using a different method to construct the regexp?