in reply to Delimited Backtracking with Regex
Update: - looks like I obviously didn't even remotely understand what you were after, so just pretend I didn't post the below :)
Gives:#!/usr/bin/perl -w use strict; use Data::Dumper::Simple; my $string = "TXXXABCDGXXXCCCDTGYYYCCCYYYCC"; my @wanted = split /XXX|YYY/, $string; print Dumper(@wanted);
Is that what you were after?@wanted = ( 'T', 'ABCDG', 'CCCDTG', 'CCC', 'CC' );
Cheers,
Darren :)
|
|---|