Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.