I want to test if a string in javascript contains normal brackets with an integer in it
var str="(12) this is a test";
var pat=/(([\d]+))/;
if (pat.test(str))
alert("true");
Works fine, but it also returns true when the string looks like this
var str="12) test";
var str="(12 test";
which should return false.
Escape brackets with
\: