| User: editor -- 2008-07-21 |
| Hits: 200 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to reverse all cases of letters in a text file? |
| Input Sample: |
| This is JUST a test. |
| Output Sample: |
| tHIS IS just A TEST. |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" to finish following steps. |
| 1. ctrl-o open source file. 2. ctrl-h open 'Replace' dialog: *in 'Replace' page: set 'Search for Pattern' to: set 'Replace with pattern' to: *select advanced page: set 'Run following for each matched unit' to: 3. Click 'Replace', done! Explanation: if ($match =~ /[A-Z]/) { $A=lc($match); } else { $A=uc($match);} above is a perl statement, means if the matched text match A-Z, change it to lowercase(lc($match)), otherwise change to upper case. |
| Download Script: scripts/230.rst.zip |
Similar Examples: |
| How to reverse the order of all the lines in a text file? (76%) How to remove/delete all blank lines in a text file? (71%) How to remove partially duplicated lines in a text file? (70%) How to shuffle all the lines in a text file? (70%) How to remove/delete all symbols in a text file? (69%) How to extract/parse all upper cases Acronyms from a text file? (68%) How to remove/delete all single-byte characters in a text file (67%) How to remove/delete all English characters in a text file? (67%) |
Check Demo of Advanced search and replace |