It is not possible to check for correct parentheses with regular expressions, because to check that you'd need to track how many brackets have been opened etc, but regular expressions cannot do that.
I suggest to you, especially if you want to construct a compiler, to familiarize yourself with formal language theory. For example, this wikipedia article gives some insight on regular expressions in the context for formal language theory: http://en.wikipedia.org/wiki/Regular_expression#Formal_language_theory