i am trying to remove a parameter from url with regexp and i keep getting Uncaught SyntaxError: Unexpected token
var url=window.location.href;
//Remove p first
url = url.replace(/p/([0-9]+)/, '');
i am trying to remove the p parapemeter /p/*
my testing url is http://mycompany.com/en/category/p/5
What am i doing wrong
Thanks
/p\/([0-9]+)/