Question

I have lines like this:

whatisthis||
whatisth|searchfor
whatisth||
whatist|searchfor
what|
what||

I want automatically remove these one:

whatis||

And

what|

With regex on notepad++, how can i do please ? All wanted line are those have two parameters:

whatist|searchfor

I want only the line like this:

EXAMPLE|EXAMPLE

Thank you.

Was it helpful?

Solution

You can use the end of line anchor $

search:  .*\|(\r?\n|$)
replace: nothing

or better:

search:  (\r?\n|^).*\|$
replace: nothing
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top