Regex within XPath rules?

Hi all,

A client needs some strings to have a length limitation in the target. These strings are the ones which contains the "title" attribute. However, this attribute is slightly different depending on the file. I know that Studio allows to set a length limit on an specific attribute with the parser rules of an XML custom file type.

Trados Studio parser rule settings window showing a rule for 'title' attribute with a minimum length set to 30 characters.

The point is: is it possible to use regex to match the different ways in which this attribute is displayed? Maybe anyone has a better approach for this? Here you have some screenshots of the mentioned attribute for reference:

Close-up of XML code highlighting 'title' attribute with the value 'metadata-title:value'.

Close-up of XML code highlighting 'title' attribute with the value '123456-card-title-name-234567890'.

Close-up of XML code highlighting 'title' attribute with the value 'title:123456-card-title-name-234567890:title'.

Thank you all in advance!



Generated Image Alt-Text
[edited by: Trados AI at 4:29 AM (GMT 0) on 5 Mar 2024]
emoji
Parents Reply Children
No Data