Community
    • Login

    Replace a certain character with ENTER

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 2.8k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors