Haha yeah... I understand regex, but only the basics.
Either way, I got it working great now Thanks anyway.
public function parse_message($str) {
$arguments = explode(' ', $str);
$count = count($arguments);
$username = explode('!', substr($arguments[0], 1));
$username = isset($username[0]) ? $username[0] : '';
$command = isset($arguments[1]) ? $arguments[1] : '';
$args = "";
for($i = 2; $i < $count; $i++)
$args .= $arguments[$i] . ' ';
$trailing_data = stripos($str, ' :');
$trailing_data = trim(substr($str, $trailing_data + 2));
return array('username' => $username, 'command' => $command, 'trail' => $trailing_data, 'args' => $args);
}