Community
    • Login

    Replace a certain character with ENTER

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 2.2k 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.
    • Rumi BalkhiR
      Rumi Balkhi
      last edited by

      Hi, I have to change the following

      text text ******* text text
      text text ******* text text

      To

      text text
      text text
      text text
      text text

      Which means, replacing (*******) with an enter

      Kindly suggest a solution

      Thanks

      1 Reply Last reply Reply Quote 0
      • patrickdrdP
        patrickdrd
        last edited by

        search -> replace

        check “search mode: extended”

        replace with: “\n” (without the quotes)

        Alan KilbornA 1 Reply Last reply Reply Quote 0
        • Alan KilbornA
          Alan Kilborn @patrickdrd
          last edited by

          Since @patrickdrd 's solution was a tad unclear, I’d suggest:

          Find: \s*\*+\s*
          Replace: \r\n for Windows-formatted file OR \n for Linux-formatted file
          Search mode: Regular Expression

          Of course, maybe the OP’s usage of * was just an example. This is unfortunate as * is a special character and needs “escaping” with \ when used in a reg exp, which just makes the whole thing appear more cryptic/complicated. :)

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