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 need a regular expression in Notepad++ to search/replace a string. My document (xml) has serveral thousand lines that look similar to this:

<Url Source="Output/username/project/Content/Volume1VolumeName/TopicFileName.htm" />

I need to replace everything starting from Volume1 to .htm" /> to replaced with X's or some other character to mask the actual file names in this file.

So the resulting string would look like this after the search/replace was performed:

<Url Source="Output/username/project/Content/Volume1XxxxxxXxxx/XxxxxXxxxXxxx.htm" />

I am working with confidential information that I cannot release to people outside of my company, but i need to send an example log file to a 3rd party for troubleshooting purposes.

FYI the X's do not need to follow the upper/lower case after the replacement, i was just using different case X's for the hell of it :)

share|improve this question
up vote 2 down vote accepted

You can use word1.*.word2 to replace anything between two words, like so:enter image description here

![Notepad++ Regex][2]

share|improve this answer
thtat works - thanks! – Richie086 Nov 28 '12 at 22:44

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.