| User: editor -- 2008-05-06 << 62 64 >> |
| Hits: 635 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| Can I find all lines containing word 'oil', and replace the whole line with text like '--This line is removed--'? |
| Input Sample: |
| ?Housing picture worsens as Fannie sees price drop ?Oil nears $123 on $200 oil prediction, supply... ?Stocks lift even as oil prices soar near $123 a barrel ?Cisco 3Q profit beats subdued expectations ?Person close to talks: Sprint close to WiMax... |
| Output Sample: |
| ?Housing picture worsens as Fannie sees price drop --This line is removed-- --This line is removed-- ?Cisco 3Q profit beats subdued expectations ?Person close to talks: Sprint close to WiMax... |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| Procedures: 1.press ctrl-o to open source file 2.press ctrl-h to open replace dialog, set as follows: In 'Replace' page: * Set 'Replace Unit' to be 'Line' * Fill 'Search for pattern' to be: * Fill 'Replace with pattern' to be: 3. click 'Replace' Button, ok! Note: oil@ means 'oil' ignore case, in later version, you can check option of "ignore cases" instead of '@'. You can also fill oil@|food@ to match lines containing oil or food or OIL or Food, etc. |
| Download Script: scripts/63.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to findout all lines that contain specified words in multiple files? (47%) How to analyze a log file and find out how many lines contain 'Pass' and how many lines contain 'Fail'? (47%) How to find all lines in file A that contain words in file B? (45%) Can I change the word order of each line and add a comma as separator? (45%) How to remove all letters before "=" in each line of text file? (44%) How to convert each line of a text file to the new format? (44%) How to remove all lines containing 'test1' and 'test2' but without 'test3'? (44%) How to find all the sub-directories named 'abc', and rename them to 'def'? (44%) |
Check Demo of Advanced search and replace |
| Keywords: |
| whole tea lines containing ignore find lines contain containing case version rsi find lines containing in word search replace whole line match whole word replace whole word find word find pattern in file replace find text replace ignore |