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

280
Views
i want to remove coma and plus (+) operator from a string

I want to remove plus(+) sign and coma from a string. here is the code.

actualValue.push(parseFloat(wholeValues[i].replace(/,/g, '')))
about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You just need to replace twice.

const value = parseFloat(wholeValues[i].replaceAll(',', '').replaceAll('+', ''))
actualValue.push(value)
about 4 years ago · Santiago Trujillo Report

0

wholeValues[i].replace(/[+,]/g, '')

or

wholeValues[i].replace(/,/g, '').replace(/+/g, '')

The first one is faster a little bit

about 4 years ago · Santiago Trujillo 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!