You can do this by using the regex twice in your action. First to check if the match is not equal to the field that you match on (brackets are present) and then to perform the actual replacement that you wish to perform if they are not equal. If they are equal, the current content of the field is retained. This works because the regex returns the field it is matched against in the case that no match was found by default.
It's quite wordy and I really wish there was a simple way to say: Abort the action/change nothing if the regex does not match.
I have described the problem and the workaround I'm using in this thread.
Here's my latest example of this workaround:
Action type: Format value
Field:
MUSICBRAINZ_ALBUMTYPE
Format string:
$if($neql($regexp(%ALBUM%,.* \'['EP\']'.*,EP,0),%ALBUM%),$regexp(%ALBUM%,.* \'['EP\']'.*,EP,0),$meta_sep(MUSICBRAINZ_ALBUMTYPE,\\))
This action checks if ALBUM contains [EP] and sets the MUSICBRAINZ_ALBUMTYPE to EP if it does. If ALBUM does not contain [EP], the release type is set to its current value(s).