regex replace syntax



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



  • @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


Log in to reply