Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a log file and I need to find all instances of <password> hash here </password> and remove the hash and replace it with some dummy text like aaa-aaa-aaa-aaaa.

The recurring search argument is anything that matches a bracket that starts with <password> and ends with </password>. All the hashes being replaced will be different.

What's the easiest way to go a bout this? The log is on a windows machine. Probably easiest would be to use MS word for me, unless it's achievable with wordpad, notepad, or some other light weight editor like textpad.


share|improve this question

2 Answers 2

You can do it with SciTE (very lightweight), but any editor that supports regular expressions should be fine.

Use the replace feature ->

 Find what - <password>.*</password>
 Replace with - <password>helloWorld</password>

Regular expression - yes

share|improve this answer
textpad can also do this. –  Daisetsu May 14 '10 at 20:39



Command line for you

 fart "filepath"  "<password> hash here </password>" "<password>sdasdadaasd</password>" 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.