Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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
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 browsing the Monastery: (5)
As of 2020-08-13 17:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (74 votes). Check out past polls.

    Notices?