-1

how to find and replace all characters with empty after Adam: name using a wild card in notepd++?

For example, I have the following 4 rows:

Eva: hi how are you
Adam: I'm fine thank you, and you?
Eva: well, I am cooking dinner, I am fine
Adam: excellent what are you cooking?

I want to have the following 4 rows to isolate Eva dialogue lines:

Eva: hi how are you

Eva: well, I am cooking dinner, I am fine

thank you, Sid

Sid
  • 1
  • Does this answer your question? [REGEX in Notepad++ find/replace](https://stackoverflow.com/questions/37171292/regex-in-notepad-find-replace) – Izana Jun 03 '20 at 23:02

1 Answers1

0
  • Ctrl+H
  • Find what: ^Adam:.+$
  • Replace with: LEAVE EMPTY
  • CHECK Match case
  • CHECK Wrap around
  • CHECK Regular expression
  • UNCHECK . matches newline
  • Replace all

Explanation:

^           # beginning of line
    Adam:   # literally
    .+      # 1 or more any character but newline
$           # end of line

Screenshot (before):

enter image description here

Screenshot (after):

enter image description here

Toto
  • 89,455
  • 62
  • 89
  • 125