Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 several lines of code and I'm looking for a way to search for a specific string e.g. 'id0=' and delete it and all 10 characters after it, per line. I would prefer a way/macro/addon for notepad++. But all other tools or scripts are welcome.

Note that ideally I'd like to delete and replace it with a 32 character string throughout the file, but for now, I'm just trying to get over the 1st hump, which is to delete it



Note that the patterns (numbers & characters) I'm looking for are always different per line and are not on every line so you couldn't do a search 'n replace with them.

Should look like this after


I've tried this method, (try =id0=[0-9A-Z]{10}), which I've found on this site, but it's not working for me.

I'm using Notepad++ and in the replace GUI, I click on regular expression (radial button), then under Find I put id0=[0-9A-Z]{10} and leave the Replace field blank, but it does NOT seem to recognize id0=[0-9A-Z]{10} – it's not finding any!

share|improve this question

Interesting, Notepad++ does not seem to understand the {10}. But see if this works out for you, it seemed to in my quick test:


You have to escape the = sign i believe and the \w is just any one alphanumeric char or underscore.

This helped me:

share|improve this answer
This: id0=[0-9]{10} and you've suggested above seemed to work! Thanks Bro! – Paul M Nov 11 '12 at 21:39
You're welcome. Please mark an answer as the correct one then. Cheers – TheUser1024 Nov 11 '12 at 23:04
"Please mark an answer as the correct one" how do I do that? – Paul M Nov 13 '12 at 2:51
No precise idea, didnt ask any questions yet. Should be easy enough to find i think. Maybe someone else can point you in the right direction. – TheUser1024 Nov 13 '12 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .