herman4016 has asked for the wisdom of the Perl Monks concerning the following question:
...
...
TEXT;
LAYER 133;
TEXTTYPE 0;
PRESENTATION 0,2,0;
STRANS 0,0,0;
XY 1;
X: 91410; Y: 50020;
STRING AVDD12;
ENDEL;
BOUNDARY;
LAYER 108;
DATATYPE 0;
XY 5;
X: 0; Y: 0;
X: 0; Y: 53530;
X: 91410; Y: 53530;
X: 91410; Y: 0;
X: 0; Y: 0;
ENDEL;
...
...
#!/usr/bin/perl use diagnostics; while (<>) { if (/TEXT;\p{Space}* \n LAYER 13[1-7];\n TEXTTYPE\p{Space}* 0;\n .* +STRING/sxm) { print $1; }else{ print "not found!\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to write multi-line regex
by kcott (Archbishop) on Mar 24, 2014 at 05:27 UTC | |
by herman4016 (Acolyte) on Mar 24, 2014 at 09:08 UTC | |
|
Re: how to write multi-line regex
by BrowserUk (Patriarch) on Mar 24, 2014 at 04:50 UTC | |
|
Re: how to write multi-line regex
by shmem (Chancellor) on Mar 24, 2014 at 07:48 UTC | |
by kcott (Archbishop) on Mar 25, 2014 at 04:15 UTC | |
|
Re: how to write multi-line regex
by NetWallah (Canon) on Mar 24, 2014 at 04:44 UTC | |
|
Re: how to write multi-line regex
by locked_user sundialsvc4 (Abbot) on Mar 24, 2014 at 16:26 UTC |