• Login
Community
  • Login

Find text and add text in new line

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 586 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.
  • G
    GG
    last edited by Jun 24, 2021, 11:24 PM

    How to find a text and add text in new line?

    original

    abc
    def
    abc
    ghi
    abc
    

    to be updated (find abc add xyz in new line)

    abc
    xyz
    def
    abc
    xyz
    ghi
    abc
    xyz
    
    P 1 Reply Last reply Jun 24, 2021, 11:31 PM Reply Quote 0
    • P
      PeterJones @GG
      last edited by PeterJones Jun 24, 2021, 11:32 PM Jun 24, 2021, 11:31 PM

      @GG ,

      • FIND = abc(\R|\z)
        (find abc followed by either a newline or the end of the file)
      • REPLACE = abc\r\nxyz\r\n
        (the \r\n is a newline sequence in windows EOL mode)
      • Search Mode = regular expression
      1 Reply Last reply Reply Quote 1
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors