Custom file-type: regex opening/closing statements not working

Hello Trados community!

I've been hitting my head against the wall, trying to create a custom file type definition for a php file. 

The code of the source document is as follows (sample provided):

<?php

return [
    'main_section' => [
      'title' => '¿Buscas dónde bailar?',
      'subtitle' => 'Encuentra un social',
      'button' => 'Ver sociales',
    ],
    'secondary_section' => [
      'title' => '20+ sociales',
      'text_1' => 'Encuentra un social',
      'text_2' => '¿No sabes dónde ir a bailar salsa o bachata esta noche? ¿Estás buscando integrarte en la comunidad de baile de tango o encontrar a tus kizomberos? Queremos ayudarte a encontrar el social de baile para tu humor, el que tenga la música y el ambiente que quieres.',
The Regular expression I've introduced to extract the text is: ^.*?=>\s'
 
Yet, when I try to process it, I get this error message:
Error message in Trados Studio stating 'Se ha producido un problema durante el procesamiento de etiquetas de apertura. Compruebe las definiciones de las etiquetas de apertura.' with an accept button.
I have tested out the regular expression in a debugger, and, in theory, it should work, because the expression is looking for and finding the text based on those parameters. Here's an image of the regex test:
Screenshot of regex101.com showing a regular expression test with the pattern .*?=>s' and a PHP code sample. The test indicates 6 matches found.
I'm completely stumped, as I do not know what is going wrong. Does anyone have any ideas? Is there anything I'm missing?!?
Please help, lol. I'm losing my mind over this, hahaha.


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