Community
    • Login

    regex replace syntax

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 333 Views 1 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.
    • I neuwI Offline
      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 Offline
        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

        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