in reply to minimal matching to end of string in regular expressions

$ perl -e '$a ="Inst1 cell1 ( .Q ( nets ) , .T (nety) ) ;\n"; $a=~s/( +.*\)).*/$1/; print $a;' Inst1 cell1 ( .Q ( nets ) , .T (nety) )