in reply to This regex seems to have splattered non-greedy everywhere
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.
#! /usr/bin/perl use strict; use warnings; while (<DATA>) { chomp; s/'[^']+'//g; print $_, "\n" for split /XX/; } __END__ aXXbXXc abcd a little 'quote XX' quote stuff XX other
pbeckingham - typist, perishable vertebrate.
In Section
Seekers of Perl Wisdom