Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only keep this String in Notepad++ (Regex)

I have again a Problem.
Have a list like

Ham$$Keepit=Keepit€ That was just Awesome #+üä!
Ber$$Dontremove=dontReMove€ delicious

Want to keep only between the $$ and €.
So the result should be

Keepit=Keepit
Dontremove=dontReMove

Thanks for your help again !

like image 249
Notepadguy Avatar asked Dec 06 '25 01:12

Notepadguy


2 Answers

Try this(v5.9.3):

  1. Open Replace dialog using Ctrl + H and make sure Regular Expression is checked in the Search mode panel.
  2. Type (.*)$$(.*)€(.*) into the Find what textbox
  3. Type \2 into the Replace with textbox
  4. Press Replace All and Voila!!! you will see the text you want.
like image 170
Chandu Avatar answered Dec 07 '25 19:12

Chandu


Minimal solution:

Find what: .*\$\$(.*)€.*

Replace with: $1

Mind to uncheck ". matches newline".

like image 26
Ingo Schalk-Schupp Avatar answered Dec 07 '25 18:12

Ingo Schalk-Schupp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!