Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.world

Am I a noob for not being able to find and replace /n?

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?

View original on lemmy.world
18

3 replies

lemmy.world

Why not regex it?

Find

\/n

Replace

/n

Or make a macro.

6
Otterreply
lemmy.ca

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

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

5

You reached the end