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

163
Views
Regex101: Check if a floating point number (e.g. 3.14159) is in a valid format.(Question 11)

This is question 11 from the regex101 quiz

I have been trying to figure out a solution to solve the test case below from failing. Can someone help with this?

Test 60/89: Just a dot is not a valid floating number.

I am using the regex below.

/^[+-]?\d*([.,]\d*)?([Ee][+-]?\d+)?$/g

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

0

You can use

/^[-+]?(\d+[,.]|\d*[.,]?\d+)(e[-+]?\d+)?$/i

Details:

  • ^ - start of string
  • [-+]? - an optional - or +
  • (\d+[,.]|\d*[.,]?\d+) - either one or more digits, then , or ., or zero or more digits, an optional .or,` and then one or more digits
  • (e[-+]?\d+)? - an optional occurrence of e, then an optional - or + and then one or more digits
  • $ - end of string.
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!