I assume that you're interested in func1 followed by balanced parenthesis so this might be of use.
#!/usr/bin/env perl
use strict;
use warnings;
my $balpar_re=qr/
(
\( # opening (
(?:[^'"()]++ # Not a ', ", ( or ) - no b
+acktracking
|(?:'(?:[^']|\')*?') #' a single quote string
|(?:"(?:[^"]|\")*?") #" a double quote string
|(?-1) # must be a ( or ) so recur
+se
)*+ # zero or more time - no ba
+cktracking
\) # closing )
)
/x;
my $text=<<'__EOT__';
xfunc1("shouldn't be changed!")
func1 (abc,"abc","should,be,changed!");
func1(arg(),narg());
__EOT__
if ($text=~ s{\bfunc1\s*$balpar_re}{newtext}g) {
print $text;
};
__DATA__