Select different parts of an line

Posted by Ricardo Sa on Super User See other posts from Super User or by Ricardo Sa
Published on 2012-09-17T18:31:45Z Indexed on 2012/09/18 9:40 UTC
Read the original article Hit count: 247

Filed under:
|
|

I'm new to regexes and have a file that looks like this one:

|60|493,93|1,6500|
|60|95,72|1,6500|
|60|43,88|1,6500|
|60|972,46|1,6500|

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:

|50|493,93|1,6500|
|50|95,72|1,6500|
|50|43,88|1,6500|
|50|972,46|1,6500|

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

|C170|002|34067||44,14000|KG|493,93|0|0|020|1102||288,11|12,00|34,57|0|0|0|0|||0|0|0|60|493,93|1,6500|||8,15|60|493,93|7,6000|||37,54||

© Super User or respective owner

Related posts about regex

Related posts about notepad++