
pattern match for 'string:
Suppose a program in
fortran:
PROGRAM EXAMPLE
C
INTEGER ....
REAL ....
CHARACTER ....
C
INCLUDE 'XXX:FILENAME.INC'
C
...
OPEN(UNIT=LUN,FILE='YYY:FILENAME.DAT',STATUS='UNKNOWN',
+ ACCESS='INDEXED')
...
END
How I get string XXX and YYY with perl?
(XXX,YYY == [a-zA-Z0-9_$])
i.e. I search pattern matching for structure: 'string: and get "string"
--------
^ ^
| | end with :
| start with '
or string == [a-zA-Z0-9_$], example: string = MNU$DIR_SRC
Thank you,
Gilles Ratel
send mail at this address
Institut de recherche d'Hydro-Quebec
1800, Montee Sainte-Julie
Varennes, QC
CANADA J3X 1S1