in reply to Regular expression for C statement
Regular expressions are not the right tool for the job. You want a proper parser. Parse::RecDescent is probably sophisticated enough.