in reply to Re^2: Regex for simple parsing job
in thread Regex for simple parsing job

Won't "split" give you an extra empty title?

I fixed the second regex like this:

my @titles = /TITLE(.*?)(?=TITLE|$)/sg;

Update: regex re-fixed

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^4: regex
by toadi (Chaplain) on Jul 27, 2004 at 10:39 UTC
    Yes it did. But I just did next when the title was empty. Not very clean, but it does the job :)

    Like I said I'm no wizzard with regexes



    --
    My opinions may have changed,
    but not the fact that I am right