Regular expression to find mismatch between source and target for variable type of strings

Hello everyone,

Is there a universal way to find mismatches between source and target for variable type of strings as long as it start with “%”?

For example, I current have a source string:
Version %1$s of function

and I want to make sure the target also has “%1$s” in it.

I tried the following check and it works:

Source = "%[:digit:]$[:alphanum:]“
Target = -”%[:digit:]$[:alphanum:]"
Regular Expression = ON
PowerSearch = ON

However this is quite restrictive and only works for the case where the variable has four letters: % + digit + $ + alphanumeric. I am wondering if there is a universal check that can pick up any “%” kind of variables, e.g., one check to detect any mismatch between source and target no matter it is “%2”, “%3ss”, “%dd”, “%1$$$”, etc.

Any help would be much appreciated! Many thanks in advance.

The following search should allow you to find all these variables missing in target.

Source: "(<\%[\$[:alphanum:]]+>)=1"
Target: -<@1>
Mode Search: Regular Expressions
PowerSearch: ON

It works. Thank you so much!