We have a script that uses DOM to capture the <a> nodes on the page. If they match a certain regex then they get replaced.
In the For loop we have something like this
if (subdomain=anchors[i].[login to view URL](/[login to view URL]\/STATIC1\/STATIC2\/p\/([^\/]*)\/c\/([^\/]*)\//i)){
if (subdomain[1].length <=10){
anchors[i].href="[login to view URL]"+subdomain[1];
The problem is I can't get the subdomain[2] to create a new link correctly.
If you look at the first line you see in the regex we have \/c\/([\/*]\/
and this works from to create the subdomain[2] but the output link should look like...
[login to view URL][1]&l=subdomain[2]
Tried adding in there "&l=" +subdomain[2]; but didn't work.
Should be pretty simple.
Thanks!