Hi there,
does anyone know how I can build a regular expression e.g. for the
string.search() function on runtime, depending on the content of
variables? Should be something like this:
var strkey = "something" ;
var str = "Somethin like this";
if( str.search( / + strkey + / ) > -1 )
{
...
}
TIA
Harry
does anyone know how I can build a regular expression e.g. for the
string.search() function on runtime, depending on the content of
variables? Should be something like this:
var strkey = "something" ;
var str = "Somethin like this";
if( str.search( / + strkey + / ) > -1 )
{
...
}
TIA
Harry
Comment