Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 cooling their heels in the Monastery: (8)
As of 2020-09-25 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (136 votes). Check out past polls.

    Notices?