Not sure where I am doing wrong. I have a string such as Test (123x) and I am trying to find the (123x) and replace it with nothing:
Here is my code
<script type="text/javascript">
var original = "Test (1x)";
var newString = original.replace(new RegExp("\(\d{1,6}[x]{1}\)",original),"");
console.log(newString);
</script>
I have tested the regex pattern and it matches correctly, however, when I log to the console, it's not replacing (1x) with ""