I have verified that your regex does exactly the parsing required in this thread! It's amazing to comprehend the power of Perl and Regex... That one little regex (although not a simple one) could parse all test cases of complex JavaScript (and thus Perl) regular expressions... You're good.... +++++ to you my friend ;)