I am trying to get the numeric values from a string. Ideally an array containing both numbers.
I am using this PHP but it only seems to match the first one and not the second.
$str = 'The address has changed from #1216640 to #1218908';
preg_match_all(
'/The address has changed from #(.+?) to #(.+?)/s',
$str,
$output,
PREG_SET_ORDER
);
print_r($output);
What I would like is an array that returns 1216640 and 1218908
