Regex to find "%2$s"

Hi Community,

Do you know how the elements in bold in the text could be found with regex?

No.SíSU PIN code: %1$s For a pre-authorization, for a period of one which is the cost of the banco, and for the maximum duration of the Community's current State, the community shall be open to a pre-authorization.%2$s
%s  La date de sortie sélectionnée est antérieure à la date d\'entrée dans le parking (%1$s).


I came up with this:
%(\d.)*(s)*

And according to the RegExr website it checks out:
Screenshot of RegExr website with a regex expression highlighted in red box, showing a test string and a match list.

But when I add this to Studio (Plain Text embedded content processor), it does not work there:
Screenshot of Trados Studio error message indicating regex does not work in Plain Text embedded content processor.

Can you please help? What am I missing or doing wrong?

Thank you!
Greta



Generated Image Alt-Text
[edited by: Trados AI at 4:34 AM (GMT 0) on 5 Mar 2024]
emoji
Parents
  • Your file is a xml one and is parsed with the xml parser. Why do you add this regex in the plain text file type? Have you activated the embedded content processing in XML via plain text? If so, did you add the proper structure rules to it?

    And for your regex, use %\d+?\$s - you do not need any brackets there, as you do not need capturing groups or other grouping.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

Reply
  • Your file is a xml one and is parsed with the xml parser. Why do you add this regex in the plain text file type? Have you activated the embedded content processing in XML via plain text? If so, did you add the proper structure rules to it?

    And for your regex, use %\d+?\$s - you do not need any brackets there, as you do not need capturing groups or other grouping.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

Children