ApSIC Xbench Forum

How to detect units mismatch

Hi all,
Could you please teach me how to detect the following error using the regular expression in the checklist?

The following regular expression only works if there is a mistake in the first unit.


Source: "([0-9])=1 mm"
Target: -"@1 mm"
Powersearch: On
Seach Mode: Regular Expression

Thank you!

You must create more than one checklist entry, depending on the number of appearances of mm in source.

2 instances:

Source: "([0-9]+)=1 mm.*([0-9]+)=2 mm"
Target: -"@1 mm" OR -"@2 mm"

PowerSearch and Match Whole Word: On.
Search Mode: Regular Expressions.
3 instances:

Source: "([0-9]+)=1 mm.*([0-9]+)=2 mm.*([0-9]+)=3 mm"
Target: -"@1 mm" OR -"@2 mm" OR -"@3 mm"

PowerSearch, Match Whole Word, Normalize Whitespaces: On.
Search Mode: Regular Expressions.

Thank you omartin,
It worked!
:joy: :ok_hand: