Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

289
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!