http://qs1969.pair.com?node_id=588056


in reply to text extraction question

This should do the trick:
my $templateformat = 'w<NM>b<NM>cm<CH>sw<SW>'; my $inputexample = 'w8b8cm512swno'; my @splittemplate = split /[^A-Z]+/,$templateformat;
my @splitinput = split /\D+/,$inputexample;
my @splitinput = split /[^(\d)(no)]+/,$inputexample;
Update:
Include "no" as an element of the second array.