Pak
Pak

Reputation: 125

Regular Expression Notepad++ to Find & replace strings

I have strings like following in a line

Q80a_Offline_MElDor_NET Q80a_Offline_Mr_NET Q80a_Offline_Mor_NET

I want to remove _NET from them using regex in Notepad++.

I also have following in the same line in the file which I don't want to touch.

Q80a_MElDor_NET Q80a_Mr_NET Q80a_Mor_NET

I can find these strings with following search string.

^Q80a_offline_[a-zA-Z]+_NET$

but not sure what to use as replace with regex expression

I want Q80a_Offline_MElDor_NET to be Q80a_Offline_MElDor

please help.

Upvotes: 0

Views: 963

Answers (1)

vks
vks

Reputation: 67968

_NET$

Try this.Replace by empty string.See demo.

http://regex101.com/r/yR3mM3/55

or

^(Q80a_offline_[a-zA-Z]+)_NET$

Replace by $1.

Upvotes: 1

Related Questions