I came across a problem in #ed where I couldn't change a url, because it was ful...

@rl_dane@polymaths.social

I came across a problem in #ed where I couldn't change a url, because it was full of slashes, which made the substitution command fail. I popped into vi to make that change, but then thought about how I might do it in ed in the future.

What I realized is that I could split the lines where the URL stops and ends, replace the line that had just the URL itself (pasting in the new URL without having to backslash-escape the slashes), and then re-join the lines.

Of course, NOW I just realized I could've done s,([^)]*),(new_url), instead, but whatevs, lol

rld@Intrepid:~$ ed
a
Here is some text    
I need to change [this link](https://example.com/some/stuff/here), ok?
some more text
.
,n
1	Here is some text
2	I need to change [this link](https://example.com/some/stuff/here), ok?
3	some more text
2s/(/(\
/
,n
1	Here is some text
2	I need to change [this link](
3	https://example.com/some/stuff/here), ok?
4	some more text
3s/)/\ 
)/
,n
1	Here is some text
2	I need to change [this link](
3	https://example.com/some/stuff/here
4	), ok?
5	some more text
2a
https://archive.org/details/plan9designintro/mode/2up
.
,n
1	Here is some text
2	I need to change [this link](
3	https://archive.org/details/plan9designintro/mode/2up
4	https://example.com/some/stuff/here
5	), ok?
6	some more text
4d
,n
1	Here is some text
2	I need to change [this link](
3	https://archive.org/details/plan9designintro/mode/2up
4	), ok?
5	some more text
2,4j
,n
1	Here is some text
2	I need to change [this link](https://archive.org/details/plan9designintro/mode/2up), ok?
3	some more text