Grouped search expression

Is there a way to use regular expressions to find the corresponding objects in the original text in the translated text?

For example, in the screenshot below, it can detect if the translation is missing "#test#", but it cannot detect if there are extra "#test#" in the translation.