0

i have few line like this

why is my airbrush not spraying paint why is painting so hard why does my ceiling look patchy after painting

I used to remove the first word using this function in notepad++

^\w+\s(.)
\1

with regular expression

but my question is , how to remove the last word from each line at notepad++?

Raptor
  • 53,206
  • 45
  • 230
  • 366

1 Answers1

0

Lets say you have your sentences in a text file line by line you'd go through following steps to remove the last word from each line at notepad++:

  • Ctrl+H
  • Find what: \s\w+$
  • Replace with: NOTHING
  • Check Wrap around
  • Search mode: Regular expression
  • Click on Replace All
Adriaan
  • 17,741
  • 7
  • 42
  • 75
help-info.de
  • 6,695
  • 16
  • 39
  • 41
  • You're welcome. If an answer has helped you solve your problem feel free to mark the answer as accepted. You should also consider voting it up. – help-info.de Nov 21 '22 at 12:26