Find Jobs
Hire Freelancers

Simple JS Link replacement fix

$5-10 USD

Cancelado
Publicado há quase 13 anos

$5-10 USD

Pago na entrega
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!
ID do Projeto: 3465793

Sobre o projeto

Projeto remoto
Ativo há 13 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos

Sobre o cliente

Bandeira do(a) UNITED STATES
United States
5,0
199
Membro desde set. 22, 2004

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.