Conversaciones » Peticiones de scripts

Change elements by regex to links in live page

§
Publicado: 21/01/2016

Change elements by regex to links in live page

Im a running live page (served with gotty), and I'd like to change occurrences of: span style="color: rgb(0, 181, 189);">([\d]{7})</span to make the items like 1234567 a link to https://site/1234567

§
Publicado: 20/02/2016

str = str.replace(/(span style=\"color: rgb\(0, 181, 189\);\">)([\d]{7})(<\/span)/igm, '$1$2$3')

Publicar respuesta

Inicia sesión para responder.