• Login
Community
  • Login

Replace a certain character with ENTER

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 2.3k 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.
  • R
    Rumi Balkhi
    last edited by Mar 7, 2019, 6:53 AM

    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
    • P
      patrickdrd
      last edited by Mar 7, 2019, 11:51 AM

      search -> replace

      check “search mode: extended”

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

      A 1 Reply Last reply Mar 7, 2019, 1:18 PM Reply Quote 0
      • A
        Alan Kilborn @patrickdrd
        last edited by Mar 7, 2019, 1:18 PM

        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
        1 out of 3
        • First post
          1/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors