People like to get the digits of size 9 , and whether or not they have an exclamation mark (!) at the end.
Example:
blabla n123456789 bla bla 78 texto...
987654321! texto qualquer 12 blaa
123 bla blum 123741852 bobobl
blablum 12345678901 papumpa...
Output:
123456789
987654321!
123741852
In my Regex, the digit "cut" is greater than 9
preg_match_all('/[!\d]{9,10}/', $a, $match);
print_r($match);
Output:
Array
(
[0] => Array
(
[0] => 123456789
[1] => 987654321!
[2] => 123741852
[3] => 1234567890 // <- FALHA
)
)