bradinthehouse
ISP
Given the string below, it parses all the information i want correctly. However, after the FIPS Code (40035) there could be any number of characters, numbers, spaces, etc. How could i change the regular expression to allow all after the 40035 and put it into a single part of the array?
<?php
$string = 'FIPSCodeVinitaOK74301Craig40035';
preg_match_all ('/^(FIPSCode)([a-z]*)([a-z]{2})(\d{5})([a-z]*)(\d*)$/i', $string, $data_array);
print_r ($data_array);
print "\n";
?>
<?php
$string = 'FIPSCodeVinitaOK74301Craig40035';
preg_match_all ('/^(FIPSCode)([a-z]*)([a-z]{2})(\d{5})([a-z]*)(\d*)$/i', $string, $data_array);
print_r ($data_array);
print "\n";
?>