If my javascript ajaxes away to my server and returns an ID of 49
in the plain text format of [49]
is there a way in which i an do something like this... (i have tested and doesnt work)
switch(data)
{
case '[*]':
(..etc.)
break;
}
Where the wildcard is the *
and i want to make sure it is enclosed within two square parenthesis?
Because i need to check that there wasnt another word returned like error
and i am reserving the default
for unexpected errors, any ideas? :) Thanks!