Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: text extraction question

by MaxKlokan (Monk)
on Dec 06, 2006 at 08:23 UTC ( #588056=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://588056]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (1)
As of 2021-12-01 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?