Hi Kacper,
Sorry, I think I misused one code in the target and it gave me different results. Here are all the tests I made:
Source: “(\<codeph\>[^\<]*</codeph\>)=1”
Target: @1
Search mode: Regular Expression
PowerSearch: On
Result:
No match found (“No errors found!” message pops-up).
Source: “(\<codeph\>[!\<]@</codeph\>)=1”
Target: @1
Search mode: MS Word Wilcard
PowerSearch: On
Result: Only the 1st instance in the source is highlighted, with unwanted text highlighted in the target (for illustration purposes, what is highlighted is in bold below).
For example, <codeph>Report 2018 or Report 2019</codeph> returns the same results as Report 2018, Report 2019.
De exemplu, <codeph>Raport 2018 sau Report 2019 returnează aceleaşi rezultate ca <codeph>Raport 2018, Raport 2019</codeph>.
Source: “(\<codeph\>[^\<]*</codeph\>)”
Target: @1
Search mode: Regular Expression
PowerSearch: On or Off
Result:
Error - Target term error: Undefined variable (@1)
Source: “(\<codeph\>[!\<]@</codeph\>)”
Target: @1
Search mode: MS Word Wilcard
PowerSearch: Off
Result:
No match found (“No errors found!” message pops-up).
Source: “(\<codeph\>[!\<]@</codeph\>)”
Target: @1
Search mode: MS Word Wilcard
PowerSearch: On
Result: Unwanted text highlighted in both source and target (strangely, the highlight in the target stops just before the digit 9)
For example, <codeph>Report 2018 or Report 2019</codeph> returns the same results as Report 2018, Report 2019.
De exemplu, <codeph>Raport 2018 sau Report 2019 returnează aceleaşi rezultate ca <codeph>Raport 2018, Raport 2019</codeph>.
Now, with the same codes in both source and target fields, Regular Expression or MS Word Wildcard, with quotation marks (for illustration purposes, I’m only showing the codes for Regular Expression, but the same goes for MS Word Wildcard):
Source: “(\<codeph\>[^\<]*</codeph\>)”
Target: “(\<codeph\>[^\<]*</codeph\>)”
Search mode: Regular Expression
PowerSearch: Off
Result:
No match found (“No errors found!” message pops-up).
Source: “(\<codeph\>[^\<]*</codeph\>)”
Target: “(\<codeph\>[^\<]*</codeph\>)”
Search mode: Regular Expression
PowerSearch: On
Result:
Only the 1st instance highlighted in both source and target, without any unwanted text being also highlighted:
For example, <codeph>Report 2018 or Report 2019</codeph> returns the same results as Report 2018, Report 2019.
De exemplu, <codeph>Raport 2018 sau Report 2019 returnează aceleaşi rezultate ca <codeph>Raport 2018, Raport 2019</codeph>.
With the same codes in both source and target fields, Regular Expression or MS Word Wildcard, without quotation marks (for illustration purposes, I’m only showing the codes for Regular Expression, but the same goes for MS Word Wildcard):
Source: (\<codeph\>[^\<]*</codeph\>)
Target: (\<codeph\>[^\<]*</codeph\>)
Search mode: Regular Expression
PowerSearch: On
Result:
Only the 1st instance highlighted in both source and target, without any unwanted text being also highlighted:
For example, <codeph>Report 2018 or Report 2019</codeph> returns the same results as Report 2018, Report 2019.
De exemplu, <codeph>Raport 2018 sau Report 2019 returnează aceleaşi rezultate ca <codeph>Raport 2018, Raport 2019</codeph>.
Source: (\<codeph\>[^\<]*</codeph\>)
Target: (\<codeph\>[^\<]*</codeph\>)
Search mode: Regular Expression
PowerSearch: Off
Result:
Exactly what I need - only the text between the <codeph> tags is highlighted:
Only the 1st instance highlighted in both source and target, without any unwanted text being also highlighted:
For example, <codeph>Report 2018 or Report 2019</codeph> returns the same results as Report 2018, Report 2019.
De exemplu, <codeph>Raport 2018 sau Report 2019</codeph> returnează aceleaşi rezultate ca <codeph>Raport 2018, Raport 2019</codeph>.
To sum it up, the solution to highlight only the text between those tags is to have the same codes both in source and target, either Regular Expression or MS Word Wilcard, without quotation marks, with PowerSearch unchecked (off):
Kind regards,
Bogdan