3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'we 1,2000,2000,000,000,000,000,000,000,100.99 wf '; $string = 'we +1200300400500600700800900,99 wf '; //preg_match_all('/([+-])?[\d.,]+([.,]\d{1,2})?/', $string, $matches); //preg_match_all("/[+-]?\d{1,3}[.,]+(\d{3}[.,'])(?R)?/", $string, $matches); //preg_match_all("/[+-]?\d{1,3}[., ]?(?:\d{3}[., ]?)(?R)?/", $string, $matches); preg_match_all("/[+-]?\d{1,3}[., ]?(?:\d{3}[., ]?)(?R)?(?:\d{3}([,.]\d{1,2})?)?/", $string, $matches); print_r($matches);

preferences:
52.62 ms | 402 KiB | 5 Q