ApSIC Xbench Forum

Regex for segments with multiple variables


I have been using this forum as an inspiration to use RegEx on Xbench and it solved so many problems already, but I didn’t manage to create a search for segments in the source that have more than one variable in this form: ${variableText}

With this one I was able to detect segments with one occurency:

Source: "(\$\{[^\}]+\})=1"
Target: -@1
Powersearch: On.
Search mode: Regular Expressions.

I didn’t find the correct syntax to add another variable “2” in order to flag segments with 2 ${variableText}, where one, or more, are not matched in target.

Thank you very much in advance for the great support! :slight_smile:


It is necessary to create several checklist entries to detect segments with more than 1 occurrency.

For instance, to detect segments with two variables in source but one missing in target, you would use the following one:

Source: "(\$\{[^\}]+\})=1\$*(\$\{[^\}]+\})=2"
Target: -@1 OR -@2
Powersearch: On.
Search mode: Regular Expressions.