While searching for my answer I found this Is there an equivalent in jQuery to PHP's `preg_replace()`?
But the thing is I want to actually match an pattern and then take the content in it and put it in a other var.
Ok.. i think I'm confusing people more than anything..
this is the code that would work in php.
$intBetweenTheTwoCurlyBraket = preg_replace("/^{([0-9]+)}.*/",'$1',"{132} TestString");
Right now what i have is.
intBetweenTheTwoCurlyBraket = item.value.replace(/^{([0-9]+)}.*/i,"$1");
But it doesnt work. What im I doing Wrong.
Thanks for any help!
For some reason escaping the curly bracket did the job,..
Thanks for all your inputs My question is now resolved