$complex_re = /^($ip) ($host) ($msg)$/ if ( $ip = /\d+\.\d+\.\d+\.\d+/, $host = /[\-\.\w]+/, $msg = /.*/ );