3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '1.20099'; //$string = 'we 100,200,300,400,500,600,700,800,900 wf '; //$string = 'we 100,200,300,400,500,600,700,800,900.9 wf '; //$string = 'we +1200300400500600700800900.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)?/", $string, $matches); //preg_match_all('/[+-]?\d{1,3}(?:,?\d{3})*(?:\.\d{2})?/', $string, $matches); preg_match_all('/^\d{1,3}(?:[,. ]?\d{3})*(?:([.,])\d{1,2})?($|\D)/', $string, $matches); print_r($matches);

preferences:
62.6 ms | 402 KiB | 5 Q