How to confirm variables are maintained

How can we create a RegEx query to ensure that all variables are consistent with the English? For instance a linguist had a typo “%1$” and left out the “s” as it was supposed to be “%1$s”. We have various formats %1$s, %2$s, %3$s, %1$s, %1$d.

Thanks!

Search for segments containing one variable:

Source: "(\%[0-9]+\$[a-z])=1"
Target: -@1
PowerSearch: On
Search mode: Regular Expressions

Search for segments containing two variables:

Source: "(\%[0-9]+\$[a-z])=1.*(\%[0-9]+\$[a-z])=2"
Target: -@1 OR -@2
PowerSearch: On
Search mode: Regular Expressions

1 Like

Thank you so much, @omartin!

If I were to create a checklist like this for 3 variables, how should I proceed? The following search does not work: “(%[0-9]+$[a-z])=1.(%[0-9]+$[a-z])=2.(%[0-9]+$[a-z])=3”

Thank you very much for your help!

@Luis, for 3 samples, try the following:

Source: "(\%[0-9]+\$[a-z])=1.*(\%[0-9]+\$[a-z])=2.*(\%[0-9]+\$[a-z])=3"
Target: -@1 OR -@2 OR -@3
PowerSearch: On
Search mode: Regular Expressions