in reply to Re^3: grabbing chunks of text
in thread grabbing chunks of text

This is a bit crazy and I dont understand it completly I just pieced it together from stuff people posted on chatterbox seems to work though
my @blocks = $file_contents =~ /:\w(?:(?!:\w).)*?type\s*=(?:(?!:\w).) +*?(?=:\w)/sg;

Replies are listed 'Best First'.
Re^5: grabbing chunks of text
by ikegami (Patriarch) on Mar 10, 2010 at 19:32 UTC

    This is a bit crazy and I dont understand it completly

    That's the complicated trick I mentioned. I don't see any advantage to doing it this way.