benlaw has asked for the wisdom of the Perl Monks concerning the following question:
#!perl -w while(<DATA>){ $count = ($_ =~ tr/\,//); print $count; if($_ =~ /A\,(.*?)\,(.*?)\,(.*?)\,(.*?)\,(.*?)\,(.*?)\,.*?\,.*?\,. +*?\,.*?\,(.*?)\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*? +\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,(.*?)\,.*?\,.*?\,.*?\,.*?\,.*?\, +.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\,.*?\ +,.*?\,.*?\,/){ print $_; } } __DATA__ Action,userID,DEPT,FolderLocation,Place,First Name,Surname,Dept2,subje +ct,brief,Phone,InternetEmail,AccessCode,AccessID,A,IA,SC,UC,PC,JD,ED, +JC,G,SCA,FNA,OAD,AAK,MBB,SACTA,Index,STATE,Fax,uID,LDisa,Second Intro +,BossName,EXphoneCall,OXCode,NameID,Section,Com,status,final Am,Speci +alID,unit,BFIT,Old Show,Second mail alias,footer,Build,Notes Server,C +ellPhone X,LLXEAS2,,,"Wah Woo, Section A",Lamshi,Coo,DSA,No vell,,,,,,,,,,HKA,, +,,,,,,,,,,Important,,,,,,,A,LLXEAS2,CWW,,NAW,,,,,,,"Welcome to Coo Du +k, ltd.",,, X,LLXEAS,,,"Wah Woo, Section A",Lamshi,Coo,DSA,No vell,,,,,,,,,,HKA,,, +,,,,,,,,,Important,,,,,,,A,LLXEAS,CWW,,NAW,,,,,,,"Welcome to Coo Duk, + ltd.",,, G,CHXAS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,sam.mo@hotmail.co +m,,,,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is there any regex limitation?
by moritz (Cardinal) on Jul 24, 2011 at 12:03 UTC | |
|
Re: Is there any regex limitation?
by Jim (Curate) on Jul 24, 2011 at 17:14 UTC | |
|
Re: Is there any regex limitation?
by Anonymous Monk on Jul 24, 2011 at 12:06 UTC | |
by Jim (Curate) on Jul 24, 2011 at 16:34 UTC | |
by Anonymous Monk on Jul 24, 2011 at 18:01 UTC | |
by BrowserUk (Patriarch) on Jul 24, 2011 at 18:08 UTC | |
by Anonymous Monk on Jul 24, 2011 at 18:54 UTC | |
| |
by davido (Cardinal) on Jul 24, 2011 at 22:59 UTC | |
by Anonymous Monk on Jul 26, 2011 at 07:39 UTC | |
|
Re: Is there any regex limitation?
by Marshall (Canon) on Jul 24, 2011 at 22:14 UTC | |
|
Re: Is there any regex limitation?
by JavaFan (Canon) on Jul 24, 2011 at 20:25 UTC |