Community
    • Login

    regex replace syntax

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 148 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.
    • I neuwI
      I neuw
      last edited by

      Using P++ in WIndows 10, cannot search and regex replace a space character with a newline (\n)
      What am I missing?

      1 Reply Last reply Reply Quote 0
      • Terry RT
        Terry R
        last edited by Terry R

        @I-neuw said in regex replace syntax:

        What am I missing?

        Well, it could be anything, as we don’t know what P++ is, maybe you meant to say NPP or Notepad++.
        A regex I’d use would be
        Find What:\x20
        Replace With:\n

        But then be aware that a \n is not normal for a windows text file. Windows uses \r and \n normally. Unix and Mac use one of them each (different ones).

        Possibly showing a bit more detail and examples if possible of what you saw when trying to do the replacement might help us to understand what could have gone wrong.

        Terry

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