$re = '/({[^}]+})+, -- (.+)/m';
$str = '{ spell = 126, type = "ability"}, -- Eye of Kilrogg
{ spell = 172, type = "ability", requiresTarget = true, debuff = true}, -- Corruption
{ spell = 686, type = "ability", requiresTarget = true}, -- Shadow Bolt
{ spell = 698, type = "ability"}, -- Ritual of Summoning
{ spell = 702, type = "ability", requiresTarget = true, debuff = true}, -- Curse of Weakness
{ spell = 710, type = "ability", requiresTarget = true, debuff = true}, -- Banish
{ spell = 755, type = "ability"}, -- Health Funnel
{ spell = 980, type = "ability", requiresTarget = true, debuff = true}, -- Agony
{ spell = 1714, type = "ability", requiresTarget = true, debuff = true}, -- Curse of Tongues
{ spell = 3110, type = "ability", requiresTarget = true}, -- Firebolt
{ spell = 3716, type = "ability", requiresTarget = true}, -- Consuming Shadows
{ spell = 5484, type = "ability"}, -- Howl of Terror
{ spell = 5782, type = "ability", requiresTarget = true, debuff = true}, -- Fear
{ spell = 6358, type = "ability", requiresTarget = true}, -- Seduction
{ spell = 6360, type = "ability", requiresTarget = true}, -- Whiplash
{ spell = 6789, type = "ability", requiresTarget = true, talent = 14 }, -- Mortal Coil';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php