in reply to Parsing addresses

Here is some code that handles the two cases supplied. This could be easily broken. You would have to make sure that all combinations of the types of roads or streets were covered.
#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; my @addresses = ( "305 Ingham Rd Garbutt QLD 4814", "Castletown Shoppingworld, Cnr Kings Rd & Woolcock St Hyde Park QL +D 4812", ); for my $address (@addresses) { $address =~ /(.+) (St|Rd|Crs) (.+) (\w+) (\d+)$/; my ($street, $suburb, $state, $postcode) = ($1." ".$2, $3, $4, $5) +; print "'$street' '$suburb' '$state' '$postcode'\n"; }
Produces this output-
'305 Ingham Rd' Garbutt' 'QLD' '4814' 'Castletown Shoppingworld, Cnr Kings Rd & Woolcock St' 'Hyde Park' 'QL +D' '4812'

Use at your own risk.