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'm new to regexes and have a file that looks like this one:


I used the regex (\|60|.*)(1,65) and I was able to find all the lines that have the information that I wanted to changed.

How can I make an replace that when Notepad++ finds (\|60|.*)(1,65), the 60 should be replaced with 50:


PS: here's an example of the full line:

share|improve this question

migrated from Sep 18 '12 at 8:40

This question came from our site for professional and enthusiast programmers.

I think this is what you want:

Find what: ^(.*)\|60\|(.*1,65.*)

Replace with: \1|50|\2

share|improve this answer
The part that I paste is only the result of the (\|60|.*)(1,65), the full line is in the end of the post (I edited it) – Ricardo Sa Sep 17 '12 at 18:39
Just remove the ^ from the front of the regex and it should work properly. – Andrew Clark Sep 17 '12 at 18:40
Updated my answer. It's ugly. – Sean Bright Sep 17 '12 at 18:41
That worked exactly as I needed... just another question if I needed to changed the |1,65| how was that going to be? – Ricardo Sa Sep 17 '12 at 18:42

You must log in to answer this question.