in reply to Delimited Backtracking with Regex

I'm not sure if I understand this correctly - but I suspect that all you really need to do is split. eg:

Update: - looks like I obviously didn't even remotely understand what you were after, so just pretend I didn't post the below :)

#!/usr/bin/perl -w use strict; use Data::Dumper::Simple; my $string = "TXXXABCDGXXXCCCDTGYYYCCCYYYCC"; my @wanted = split /XXX|YYY/, $string; print Dumper(@wanted);
Gives:
@wanted = ( 'T', 'ABCDG', 'CCCDTG', 'CCC', 'CC' );
Is that what you were after?

Cheers,
Darren :)