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.
2021-03-25 19:55:57 -05:00
|
|
|
+++
|
|
|
|
title = "Text Substitution in Discord using `sed`"
|
2021-05-20 11:31:35 -05:00
|
|
|
date = "2021-03-25"
|
|
|
|
aliases = [
|
|
|
|
"posts/text-substitution-in-discord-using-sed/",
|
|
|
|
]
|
2021-03-26 13:10:17 -05:00
|
|
|
|
|
|
|
description = """
|
|
|
|
Discord has (very primitive) support for text replacement using `sed` syntax.
|
|
|
|
"""
|
|
|
|
|
2021-05-20 11:31:35 -05:00
|
|
|
tags = [
|
|
|
|
"tutorial",
|
|
|
|
"discord",
|
|
|
|
"discord-tricks",
|
|
|
|
]
|
2021-03-25 19:55:57 -05:00
|
|
|
+++
|
|
|
|
|
2021-03-27 18:38:29 -05:00
|
|
|
## Tutorial
|
2021-03-25 19:55:57 -05:00
|
|
|
|
|
|
|
[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.
|
2021-03-25 19:55:57 -05:00
|
|
|
|
|
|
|
## 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
|