1
I have the following regex:
preg_match_all('/([0-9]+[\.]*[0-9]*[\,.]*[0-9]*)/', $string, $matches)
If I get a string:
1 - João da Silva number 123456 with the value of R$:6,298.65
I have as return:
array (size=27)
0 => string '1' (length=1)
1 => string '123456' (length=5)
2 => string '6.298,65' (length=8)
However, I would like to return only the value in real: 6.298,65
If you add
$
at the end of your regex, also works.– Valdeir Psr