this post was submitted on 18 Jan 2024
18 points (95.0% liked)

Notepad++

182 readers
2 users here now

A community for discussing the notepad++ text editor https://notepad-plus-plus.org/

Looking for mods, if you want to mod the community feel free to dm @[email protected]

founded 10 months ago
MODERATORS
 

When I copy some long string like json from a debugger, and want to look at it properly formatted it starts off encoded with /n and /t characters, etc.

I usually go:

  • Replace (Normal) /n -> qqqq
  • Replace (Extended) qqqq -> /n

Is there some trick to do this in one step?

top 3 comments
sorted by: hot top controversial new old
[–] whereisk 6 points 10 months ago* (last edited 10 months ago) (1 children)

Why not regex it?

Find

\/n

Replace

/n

Or make a macro.

[–] [email protected] 5 points 10 months ago (1 children)

I think the key bit that OP was missing was the escape character \

At least, that's the mistake I was making once

[–] [email protected] 1 points 10 months ago

First thing I thought by reading the post. I'm glad to see your comments now.