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