rajeshatbuzz has asked for the wisdom of the Perl Monks concerning the following question:
I am just begginer in perl. Just want to do following task through regular expression.
I have huge sql file and trying to replace value of each line first 4 digit separated by comma.
FILE 1:
(7, 0, 7, 55, NULL, 0, '', 'Wise Package Studio Overview and its advan +tage', 1260350867, '203.145.176.177', 0, 0, 0, 0, 197, 0, 0, 0, ''), (8, 0, 8, 55, NULL, 0, '', 'what is Tarma QuickInstall 2 and its usage +', 1260351089, '203.145.176.177', 0, 0, 0, 0, 61, 0, 0, 0, ''), (9, 0, 9, 55, NULL, 0, '', 'what is Tarma Installer 5 and its usage?' +, 1260351321, '203.145.176.177', 0, 0, 0, 0, 253, 0, 0, 0, ''), (10, 0, 10, 56, NULL, 0, '', 'what is Tarma ExpertInstall 3 and its us +age?', 1260351466, '203.145.176.177', 0, 0, 0, 0, 69, 0, 0, 0, ''), (11, 0, 11, 55, NULL, 0, '', 'What is Smart Install Maker and its usag +e?', 1260351588, '203.145.176.177', 0, 0, 0, 0, 241, 0, 0, 0, ''), (14, 0, 14, 55, NULL, 0, '', 'what is MSI Studio and its use?', 126035 +2667, '203.145.176.177', 0, 0, 0, 0, 174, 0, 0, 0, ''),
FILE 2 : It should be manipulated from first file based on following specification...
First Digit - should be incremented by 1
Second Digit - if its 0, no change but with others digit +3
Third Digit -Should be added +3
Fourth Digit - if 55 then make it 65 and if 56 then make it 66
Rest digit should remain unchanged.Any help on this? I am basically got stuck in regular expression part
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Advance Regular expression questions
by kennethk (Abbot) on Jan 04, 2012 at 17:19 UTC | |
|
Re: Advance Regular expression questions
by CountZero (Bishop) on Jan 04, 2012 at 19:24 UTC | |
by tobyink (Canon) on Jan 05, 2012 at 10:46 UTC | |
by CountZero (Bishop) on Jan 05, 2012 at 19:13 UTC | |
|
Re: Advance Regular expression questions
by Skeeve (Parson) on Jan 04, 2012 at 17:17 UTC | |
|
Re: Advance Regular expression questions
by roboticus (Chancellor) on Jan 04, 2012 at 18:04 UTC | |
|
Re: Advance Regular expression questions
by jethro (Monsignor) on Jan 04, 2012 at 17:33 UTC | |
|
Re: Advance Regular expression questions
by JavaFan (Canon) on Jan 04, 2012 at 18:10 UTC | |
|
Re: Advance Regular expression questions
by locked_user sundialsvc4 (Abbot) on Jan 06, 2012 at 14:33 UTC |