Replace 10th character if 4th-8th character contains equals "B490" in a text file

What codes can I use in Notepad++ to replace 10th character to "234" of each line if the 4th-8th character contains "B490"?
rowfeiAsked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
or simply
(.{3})(.{3})(.*?)(FE450)

Open in new window

and
\1ZZZ\3\4

Open in new window

0
 
AndyAinscowFreelance programmer / ConsultantCommented:
I don't think you can with notepad++
0
 
KimputerCommented:
Can be done with VBS, but since you're in the .Net programming section anyway, it's also better to have it as .Net, and you can have it use console, drop down to form, or send to app.
What would you have against such a solution?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Rgonzo1971Commented:
Hi,

In Notepad++
Find What
((.{4}B490.)|(.{3}B490.{2}))(.)

Open in new window

Replace With
\1234

Open in new window

Search Mode Regular expression

Regards
0
 
rowfeiAuthor Commented:
Thanks, Rgonzo1971. Sorry for the unclear question. Below is what I am trying to get. Search all lines contains FE450, then replace 3rd-5rd character to "ZZZ."

What codes should I use?

Example file:
123AAA345FE450DERWQQW
234BBB335DDFFFEEDFE450E
345CCC234ERFDF3FR06GE

My wish :-)

123ZZZ345FE450DERWQQW
234ZZZ335DDFFFEEDFE450E
345000234ERFDF3FR06G
0
 
Rgonzo1971Commented:
then try
find what
(.{3})(.{3})(.*)(FE450)(.*)

Open in new window

replace with
\1ZZZ\3\4\5

Open in new window

choose REgex and untick .Matches newline
0
 
rowfeiAuthor Commented:
Yes, it works!!!! Thank you so much!!!
0
 
Rgonzo1971Commented:
Solution according to author's  comment
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.