0

I've custom regex where I match float numbers.

Regex:

/[0-9]*\,?[0-9]*\.?[0-9]*/m

When I tried with string 1,5$+absd1.5a get 10 matches on result where 1 match == 1,5 and 8 match = 1.5. Other matches is empty. How I can match without empty results?

Demo

https://regex101.com/r/jnhsly/1

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125

0 Answers0