Regular Expression in Project Checklist: Is there any way to find ALL different occurrences between source variable and target variable?

Sample Bilingual/TUs:
Source TU: (Fig. 6h) and (Fig. 6i)
Target TU: (图 6H) 和 (图 6I)

According to read the history article, I know how to search ONE different occurrence between source variable and target variable.
Source: "<[[:number:].,_-]+[:letter:]+>)=1"
Target: -<@1>
Mode Search: Regular Expressions
PowerSearch: ON

But I don’t know is there any way to find ALL different occurrences between source variable and target variable?
I have tried to search as following but nothing found.
Source: "(<[[:number:].,-]+[:letter:]+>)=1""([^[:number:]]+)=2""(<[[:number:].,-]+[:letter:]+>)=3"
Target: <@1>.*-<@3>
Mode Search: Regular Expressions
PowerSearch: ON

Can the Xbench technical support team give me in ideas on question?

I understand that you wish to find if there are more instances.

Currently, the best approach is to create a checklist with one entry supporting segments with up to one instance, one entry supporting segments with up to two instances, and so on.

For example, the checklist entry for the first 3 instances would be:

  • Source: "(<[[:number:].,-]+[:letter:]+>)=1.*(<[[:number:].,-]+[:letter:]+>)=2".*(<[[:number:].,-]+[:letter:]+>)=3"
  • Target: -"<@1>" or -"<@2>" or -"<@3>"
  • Mode Search: Regular Expressions
  • PowerSearch: ON

That is, you would capture 3 variables and then and you would look for segments who do not have any of the resolved variables in the target text using the Powersearch or operand.

1 Like

Hello, I am new to checklists and would like to understand the meaning of the @ in the examples above. Thank you!

IzaO

@IzaO, for example, @1 recalls the resolved value captured with (something)=1.

The two last items in the first table in the Regular Expressions and Microsoft Word Wildcards help topic, explain a little bit how variables work in the Xbench RegEx engine.

@pcondal, thank you for your following sample. It does works; but it seems this is not the perfect way because we need write all the possible match. Expected there will be better solution to match all the matched variable in the future!


For example, the checklist entry for the first 3 instances would be:

  • Source: "(<[[:number:].,-]+[:letter:]+>)=1.*(<[[:number:].,-]+[:letter:]+>)=2".*(<[[:number:].,-]+[:letter:]+>)=3"
  • Target: -"<@1>" or -"<@2>" or -"<@3>"
  • Mode Search: Regular Expressions
  • PowerSearch: ON