rajeshkumar created the topic: Regular expression perl question
I am just beginner 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 advantageβ, 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 usage?β, 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 usage?β, 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?β, 1260352667, β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
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
Iβm a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND