[Israel.pm] recursive regex
Yossi.Itzkovich at ecitele.com
Yossi.Itzkovich at ecitele.com
Wed Jun 9 01:22:49 PDT 2004
Hi,
I have text in this format (more or less)
------------------
BEGIN_A
...
END_A
BEGIN_B
BEGIN_C
...
END_C
END_B
------------------
A,B,C are macros that are used later, and I want to save them in my script
for other needs.
if I do:
while ( /BEGIN_(\w+).+?END_(\1)/sg)
{ print "$1,$2;}
I don't see the C macro, because it is inside B. How can I solve it nicely
?
Thanks
Yossi
More information about the Perl
mailing list