This took me a while to get right, so let me share it.

Below unix command can be used to replace the markdown links to HTML links
in a text file:

sed -i -e 's/\[\([^\]*\)\](\([^)]*\))/<a href="\2">\1<\/a>/g'
RELEASE-NOTES.md

Tricky points were that sed does not recognize the non-greedy qualifier, so
you need to do [^x]* to match _up to_ the next `x`.
Also round brackets are taken literally and capturing group brackets need
to be escaped (the opposite from what I expected).

Reply via email to