Micro Focus QTP (UFT) Forums
How to remove one specific row in a textfile? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to remove one specific row in a textfile? (/Thread-How-to-remove-one-specific-row-in-a-textfile)



How to remove one specific row in a textfile? - kkishore12345 - 12-10-2008

Hi All,

Can anyone provide solution for the below mentioned problem?

There is a web page, which has got 2 pages of Text. 1.Agreement 2.Policy

My task is to write the text from 1.agreement without spaces,tabs and also 2.Policy in a different file. then I need to concatenate both these files

I am able to extract the complete text into a Notepad/text file. but, there are two strings "Document selection", "area/region selection" at the end of this text in both the pages. I need to remove this "Document selection and Area/region selection" lines before I concatenate both of these files.

I need to do this exercise for 10 different countries Asia, Africa, US, Korea, Japan, Austrialia, New Zealand, UK, Russia and France.

Please provide code/solution for the above scenario.

Thanks,
kishore


RE: How to remove one specific row in a textfile? - surya_7mar - 12-14-2008

while merging when you find this text replace iwht ""

try to write to megre file line by line


RE: How to remove one specific row in a textfile? - kkishore12345 - 01-04-2009

Thanks for your help Surya!