Valid:
((int)10)(int)10((char)((x+y)&1))((int *)1)Invalid:
The language of (balanced) parenthesized expressions is not regular, i.e., you can't write a regular expressions matching these kind of strings.
See SO question: Why are regular expressions called "regular" expressions and Wikipedia: Regular Languages.
You need to work with a more capable parsing technique such as a CFG with for instance ANTLR.
You could start with something like:
CastedExpression ::= Cast Expression | LPAR CastedExpression RPAR
Cast ::= LPAR Type RPAR
Expression ::= Sum | Product | Litteral | LPAR Expression RPAR | ...
Type ::= char | int | Type ASTERISK | ...
(Feel free to edit grammar above if you find any obvious improvements).