1

I want to use textpad on a .csv file to remove all lines of text that include the following phrase

"Norwegian Cruise Line"

So it does a search and replace on the following and deletes the whole line and repeats through the document:

"V186552004127",18,**"Norwegian Cruise Line"**,655,9751509,"Norwegian Bliss","Superior","Bahamas & Florida",12/04/2020 00:00:00,"Caribbean","Ocean","Scenery","Adventure","History",9,"New York",0,"New York",1,0,,7,0," ",8.00,19/04/2020 00:00:00,"NYK","New York","USA, NY","Disembark",0,0,"",0,0,0,0

Thanks in advance

asmgx
  • 7,328
  • 15
  • 82
  • 143

3 Answers3

2

You can use the following steps:

  1. Open the Find Dialog with F5
  2. Enter your search term and klick Mark All. This will bookmark all lines containing your serached term.
  3. From the Edit menu or the context menu select Delete|Bookmarked Lines
0

I'm not sure about textpad, but you can use something like visual studio code or sublime which supports multi line cursors. Then, for example, in visual studio code just highlight the phrase you want and hit ctrl+F2 or right click and hit change all occurrences. From there you can hit ctrl+shift+k to delete the lines.

Nolence
  • 2,134
  • 15
  • 25
0

Using regular expressions in Textpad:

Search:
.*"Norwegian Cruise Line".*\r
Replace With:
(empty)
Replace All

This will search zero o more characters before target text followed by zero or more characters and a newline. Will erase all lines containing "Norwegian Cruise Line" (including quotes).

isidroco
  • 3
  • 2