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

298
Vistas
Why replace method works in Yandex Contest, but replaceAll don't (javascript, nodejs)?

I had a task, where i used replaceAll regex method and could not pass many tests in Yandex Contest testing system, but locally everything seems to work properly. I decided to use replace with g modifier instead, and all tests passed. I wonder what was the problem exactly?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Do you mean you didn't include the g modifier when using relaceAll?

As stated in the documentation of replaceAll

A RegExp without the global ("g") flag will throw a TypeError: "replaceAll must be called with a global RegExp".

about 4 years ago · Juan Pablo Isaza Denunciar
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