Parse a raw IRC message
PHP, 87 bytes
$a=($s=preg_split)(&quot;# +:#&quot;,$argv[1]);array_splice($a,0,1,$s(&quot;# +#&quot;,$a[0]));print_r($a);

The first regex splits the argument by one or more spaces followed by a colon.
The second regex splits the first element by one or more spaces with no colon.
array_splice replaces the first element with the result of the second preg_split.
print_r prints the resulting array.
function version for testing
$cases=[
    &quot;join #foo #bar #baz&quot; =&gt; [&quot;join&quot;, &quot;#foo&quot;, &quot;#bar&quot;, &quot;#baz&quot;],
    &quot;msg person hi&quot; =&gt; [&quot;msg&quot;, &quot;person&quot;, &quot;hi&quot;],
    &quot;msg #channel :hello world&quot; =&gt; [&quot;msg&quot;, &quot;#channel&quot;, &quot;hello world&quot;],
    &quot;help :how do I use IRC&quot; =&gt; [&quot;help&quot;, &quot;how do I use IRC&quot;],
    &quot;foo bar :baz bip :abc def :ghi :xyz&quot; =&gt; [&quot;foo&quot;, &quot;bar&quot;, &quot;baz bip&quot;, &quot;abc def&quot;, &quot;ghi&quot;, &quot;xyz&quot;],
];
function i($argv_1_){$a=($s=preg_split)(&quot;# +:#&quot;,$argv_1_);array_splice($a,0,1,$s(&quot;# +#&quot;,$a[0]));return $a;}
foreach($cases as$x=&gt;$e)
{
    $y=i($x);
    echo &quot;case '$x': ['&quot;,join(&quot;','&quot;,$y),'&quot;]: ',($y&lt;&gt;$e?&quot;FAIL. Expected: ['&quot;. join(&quot;','&quot;,$e).&quot;']&quot;:OK),&quot;\n&quot;;
}