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
  • 561,645
  • 34
  • 376
  • 476
Andreas Hunter
  • 3,596
  • 7
  • 39
  • 97

0 Answers0