Link to home
Start Free TrialLog in
Avatar of wasabi3689
wasabi3689Flag for United States of America

asked on

How to remove unneeded words from Notepad?

Again, I have a notepad++ file with many line, I want to do some cleanup to the file. I want to remove all the words before "ConvertWordToPDF" for each line.

How do I program it by find and replace function from Notepad++. For example,

I have this

wewqewqrwerwerwerewrwerew |ConvertWordToPDF|342423sdadas
sdawdwqdqwqwdqwdqwdqwdq |ConvertWordToPDF|hne333332423
34324fsdfsdfsdfdsfdsfdfdsfds33 |ConvertWordToPDF|hne399932423
....
etc

Output I want

342423sdadas.doc
hne333332423.doc
hne399932423.doc
....
etc

How to do that?
Avatar of NVIT
NVIT
Flag of United States of America image

Search mode: Regular expression

Find what: (^.+\|.+\|)(.+)
Replace with: \2
Avatar of wasabi3689

ASKER

How to add .doc for each in the end?
Replace with: \2.doc
how to remove all linesas well?
never mind, I figure out  ^[ \t]*$\r?\n
NVIT, can you explain a bit more your solution  (^.+\|.+\|)(.+), what each symbol represents?
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial