I trying to match a variable from an url. This works fine if I use the expression directly in the match method. However I am having problem getting it to work if the expression is inside a string.
var match = '/(page_art_list=\d+)/';
match contains the value..
var pattern = "/("+paramName+"=\d+)/";
var match = this.href.match(pattern);
match is null
I have double checked that both examples produce exactly the same string.
Any thoughts?
Best regards. Asbjørn Morell