This works correctly with all of your string examples:
\w+(?=\((?:[^()]*\([^()]*\))*[^()]*$)
The most interesting part:
(?:[^()]*\([^()]*\))*
It matches zero or more balanced pairs of parentheses along with non-paren characters before and between them (e.g. y=bbb() and bbb(x), ccc() in your example strings). When this part is completed, the final [^()]*$ ensures that there are no more parsers to the end of the line.
Remember, however, that this regular expression is based on the assumption that there will never be more than one level of nesting. In other words, they are assumed to be valid:
aaa() aaa(bbb()) aaa(bbb(), ccc())
... but it is not:
aaa(bbb(ccc()))
The ccc(bbb(aaa( in your samples seems to imply that multi-level nesting is allowed. If so, you cannot solve your problem with just a regular expression. (Of course, some regular expressions support recursive patterns, but the syntax disgusting even with regex standards. I guarantee that you will not be able to read your own regular expression a week after writing it.)
source share