Also, following on from jryan's idea here is a version that uses split:
$_ = "X1aaX2bbX3heeX4...X5loveUX6XXXX7X8" ; my @match = split /(X\d)/; print "String: " . $_; foreach my $word (@match){ print $word; print "\n" unless $word =~ /X\d/; }
--
John.
In reply to Re: use regex to split sentence
by jmcnamara
in thread use regex to split sentence
by dyno
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |