• Login
Community
  • Login

Line operation that deletes first word on each line

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 115 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Sam J.
    last edited by Apr 9, 2025, 4:26 PM

    Hello,

    Long time ago, there was a line operation that deletes first word on each line. I believe this was back when it was a plugin. Is this functionality still available?

    Example:

    FIRST TODAY IS MONDAY
    SECOND TOMORROW IS TUESDAY

    After deleting first word on each line:

    TODAY IS MONDAY
    TOMORROW IS TUESDAY

    In case it matters, I’m using Notepad++ v8.7.7.

    Thank you.

    A 1 Reply Last reply Apr 9, 2025, 4:33 PM Reply Quote 0
    • A
      Alan Kilborn @Sam J.
      last edited by Apr 9, 2025, 4:33 PM

      @Sam-J said in Line operation that deletes first word on each line:

      Is this functionality still available?

      Not exactly.

      But you can do a regular expression replacement:

      Find: (?-s)^\w+ +(.*)
      Replace: ${1}

      S 1 Reply Last reply May 22, 2025, 1:12 PM Reply Quote 2
      • S
        Sam J. @Alan Kilborn
        last edited by May 22, 2025, 1:12 PM

        @Alan-Kilborn Great idea! It works wonderfully. Thank you.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors