Replace backslash and new line
-
No the spacing was removed so thought the image might be better. How can I retain the spacing? Thanks
-
By following the tip:
``` 123456789a Hello World after four spaces 123456789a Two Spaces Then This Line ```
renders as
123456789a Hello World after four spaces 123456789a Two Spaces Then This Line
-
@Darren-Brown said in Replace backslash and new line:
How can I retain the spacing?
Get it showing in the black box, as Peter shows, while you are composing, before pressing Submit on your post?
-
282882|1|IPLC|B|||ABC123 \ ||N||||||N||C|30| 282882|2|IPLC|B|||TEXT \ ||N||||||N||C|30|
Got it (hopefully) thanks.
-
So I would like it to be -
282882|1|IPLC|B|||ABC123||N||||||N||C|30| 282882|2|IPLC|B|||TEXT||N||||||N||C|30|
Thanks
-
FIND =
\s*\\\s*
– finds zero or more spaces, a literal backslash, and zero or more spaces (where the generic “spaces” can mean SPACE, TAB, NEWLINE, and a few other rare characters)
REPLACE = empty
SEARCH MODE = regular expression -
Perfect, thanks, just tried with regular expression for search mode and it does exactly what is needed. Thanks so much, I’ve been trying this for days and not getting anywhere.
-
@Darren-Brown said in Replace backslash and new line:
I’ve been trying this for days
In case you hadn’t seen it, the ? menu on the Notepad++ menu bar has a menu called “Notepad++ Online User Manual” (or similar; the phrasing changed a few versions back). This takes you to https://npp-user-manual.org/ , which has a detailed description of the application, including a rather large page on searching, and the difference betweeen Normal, Extended, and Regular Expression search modes.
-
I must admit I read a comment somewhere saying that the help options weren’t much help so haven’t looked, but will definitely refer to it in the future. Thanks again.
-
@Darren-Brown said in Replace backslash and new line:
I’ve been trying this for days and not getting anywhere.
In the future, don’t struggle so long before asking. :-)
Of course, if you like the power and simplicity of Peter’s solution, you can read more about it, and learn how to derive your own solutions, and you won’t struggle.
Look for “regular expression” in the FAQ category. -
@Alan-Kilborn Will do, thanks :-)