I'm having a question, how can I do to extract numbers from a String in PHP preserving the formatting of it?
I found a solution on the forum in English, but when extracting the numbers the default date, for example, is not preserved.
$str = 'Paga. ref. a nota fiscal número 8888, com o cheque número 9999 em 14/08/2015';
preg_match_all('!\d+!', $str, $matches);
print_r($matches);
Source: Extract numbers from a string