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

192
Views
Jquery or javascript regex to extract decimals

I need to write a regex in javascript or jquery to extract all decimals with this format "XXXXXX,XX".

My string to analyse is :

aaawhatyouwant"4666","bla bla","5,00","27/06/2022","09:00","14:00","","0x7fffffffffffffff","4670","0,50","28/06/2022","07:00","07:30","4669","08:00","08:30"whatyouwantbbb

And my regex is:

/aaa.*(?:(?:"(\d+,\d\d)").+)bbb/g

So expected results would be:

5,00 is missing!
0,50 ok

Any help would be appreciated!:)

Regards François

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you want to match only comma separated decimal numbers try this:

/(\d+,\d+)/g

You can test it here: https://regexr.com/6oop4

To match comma and period separated numbers try this:

(\d+(,|\.)\d+)
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!