<?php preg_match('/(.*?)(\d+)(?!.*\d)/', 'GB67 7HG', $matches);print_r($matches); ?>
Standard input is empty
Array ( [0] => GB67 7 [1] => GB67 [2] => 7 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!