in reply to how to write multi-line regex

If you are sure blocks of logical "records" wont get mixed up, you can try this regex:
/TEXT;\p{Space}*LAYER 13[1-7];\s+TEXTTYPE\p{Space}0;.+STRING\s(\S+\w +).+?ENDEL;/s
To get proper logical blocks, you probably need something like:
local $/="ENDEL;\n";
But if you use this, you will need to drop the trailing ENDEL; in the regex.

        What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
              -Larry Wall, 1992