regular expression for whole program

1
\$AXIOM ([A-Z]\'{0,1})\\n\$NTERM(( [A-Z]\'{0,1})+)\\n\$TERM(( "[a-z\*\+\(\)]")+)\\n((\$RULE (([A-Z]\'{0,1}) =(([( [A-Z]\'{0,1})( \"[a-z]\"| \"\*\"| \"\+\"| \"\(\"| \"\)\")]+\\n| \$EPS\\n)+)))+)