This repository has been archived on 2021-05-20. You can view files and clone it, but cannot push or open issues or pull requests.
blog/content/posts/sed-text-substitution-in-discord.md

30 lines
745 B
Markdown
Raw Permalink Normal View History

+++
title = "Text Substitution in Discord using `sed`"
date = "2021-03-25T18:48:15-05:00"
author = "bbaovanc"
2021-03-26 01:02:37 -05:00
tags = ["discord", "discord-tricks"]
keywords = ["discord", "sed", "text", "replacement"]
2021-03-26 13:10:17 -05:00
description = """
Discord has (very primitive) support for text replacement using `sed` syntax.
"""
showFullContent = false
+++
## How-to
[Example Video](/blog/media/discord-tricks/sed-text-replacement.mov)
2021-03-26 13:10:17 -05:00
If you send a message using `sed` substitution format (`s/old text/new text`),
Discord will execute it on the message you've last sent.
## Caveats
- Regex is not supported
- Global substitution is not supported
2021-03-26 13:10:17 -05:00
*This post was adapted from [gitea:bbaovanc/discord-tricks][1]*
[1]: https://git.bbaovanc.com/bbaovanc/discord-tricks