Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

324
Vistas
Javascript toString() forces ASCII character to change to hex

I'm having a little problem with toString(), when I'm changing the whole function to string to match with regex, toString() changes special characters to HEX, but I need them to stay as they were original in the function as I need to match them later original to original with search and replace function.

Here is an example.

// I'm matching XX.g1("ABV", JU)
function wd () {
 var Dq = document["createElement"](XX.g1("ABV", JU));

}
const regex = / /
const l = wd.toString().match(regex);
let obj = {};
for (let i = 0; i < l.length; i++) {
  const e = l[i]
  console.log(e)
  obj[e] = eval(e)
}

returning XX.g1(\"A\u0017BV\", JU) but I need it to be formated as on the picture original

{
    "XX.g1(\"A\u0017BV\", JU)": "span",
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda