<?xml version="1.0" encoding="windows-1252"?>
<node id="482674" title="Re: This regex seems to have splattered non-greedy everywhere" created="2005-08-10 13:45:28" updated="2005-08-10 09:45:28">
<type id="11">
note</type>
<author id="329777">
pbeckingham</author>
<data>
<field name="doctext">
&lt;p&gt;
It can be easily made to work if you first take out the quoted stuff.  Bear in mind that this (and your) code does not handle quoted text that spans lines.
&lt;code&gt;
#! /usr/bin/perl

use strict;
use warnings;

while (&lt;DATA&gt;)
{
  chomp;

  s/'[^']+'//g;
  print $_, "\n" for split /XX/;
}

__END__
aXXbXXc
abcd
a little 'quote XX' quote stuff XX other
&lt;/code&gt;
&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-329777"&gt;
&lt;br /&gt;&lt;br /&gt;&lt;font size="-3"&gt;pbeckingham - typist, perishable vertebrate.&lt;/font&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
482665</field>
<field name="parent_node">
482665</field>
</data>
</node>
