|Do you know where your variables are?|
Regex for simple parsing jobby toadi (Chaplain)
|on Jul 27, 2004 at 09:06 UTC||Need Help??|
toadi has asked for the
wisdom of the Perl Monks concerning the following question:
I program perl for a while now and still suck at regexes.
My file looks like:
I read following link: "How do I extract all text between two keywords like start and end?". But it didn't make me any wiser.
I want to get everyting from STARTP until ENDP. En then cut stuff up between TITLE and ENDTITLE. But if I do like the suggested link I get everything fron first STARTP until last ENNDP. And I want to match first from First STARTP until first ENDP in the file and then from next STARTP until next ENDP. And the same for TITLE and ENDTITLE.
And no there is no recursion in these tags.
My opinions may have changed,
but not the fact that I am right
janitored by ybiC: Retitle from one-word "regex" nodetitle to avoid hindering site searching. Also converted node link from <a href...> to Monastery style [id://nnnn] to avoid logging out monks with cookie set from different PM domain (perlmonks.(org|net), sans leading "www"...)