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

161
Vistas
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 Respuestas
Responde la pregunta

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 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