$test =~ /^ # Match from the beginning of $test
(.*) # Capture zero or more characters in $1 up to
:[ ]+ # a literal : and 1 or more spaces
(.*)$ # Capture zero or more characters to the end of $test in $2
/x; # x modifier allows for comments in the regex