I don';t think you can do it in one step. You have to get the "insert" out of the way first:
$string = "<insert img=\"filename.jpg\" title=\"title of image\" artist=\"artist name\" medium=\"image medium\" caption=\"...\">";
$pattern = '/<insert((\s+[=]+\s=\s"["]"))>/';
preg_match ($pattern, $string, $matches);
preg_match_all('/(\s+([=]+)\s=\s"(["]*)")/', $matches[0], $p);
foreach ($p[2] as $e) {
echo $e . "<BR>";
}
echo "<BR>";
foreach ($p[3] as $e) {
echo $e . "<BR>";
}