diff --git a/TextReplace-Rules.md b/TextReplace-Rules.md new file mode 100644 index 0000000..770f068 --- /dev/null +++ b/TextReplace-Rules.md @@ -0,0 +1,69 @@ +This page contains a list of TextReplace rules I use. + +# Link Manipulation +## String Replacement +### Change `twitter.com`/`x.com` links to `fxtwitter.com`/`fixupx.com` +```regex +Find: https://twitter.com +Replace: https://fxtwitter.com +Only if includes: /status/ +``` +```regex +Find: https://x.com +Replace: https://fixupx.com +Only if includes: /status/ +``` +### Change `fandom.com` links to `antifandom.com` links +```regex +Find: fandom +Replace: antifandom +Only if includes: .com/wiki/ +``` + +## Regex Replacement +### Replace `curseforge.com` links with `cflookup.com` links +```regex +Find: ((legacy|www)\.)?curseforge\.com +Replace: cflookup.com +Only if includes: mod +``` +### Replace YouTube links and YouTube Shorts links with `youtu.be` links +*This also allows YouTube Shorts to be embedded and played as normal videos.* +```regex +Find: https?:\/\/(?:www\.)?youtube\.com\/(?:watch\?v=|embed\/|shorts\/)([\w\-]+) +Replace: https://youtu.be/$1 +``` +### Replace `media.discordapp.com` links with `cdn.discordapp.com` +```regex +Find: https:\/\/media\.discordapp\.net(?=\/) +Replace: https://cdn.discordapp.com +``` +### Beautify GitHub Pull Request/Issue embeds (untested) +```regex +Find: https:\/\/(to)?github\.com\/(?[A-Za-z0-9-]+\/[A-Za-z0-9._-]+)\/(issues|pull)\/(?[0-9]+)\/* +Replace: [$#$]($&) +``` +# Miscellaneous Rules +## Regex Replacement +### Easy Google searching +```regex +Find: \s+ +Replace: + +Only if includes: google: +``` +```regex +Find: google:(?.*) +Replace: > +``` +### Replace `*F` with `°F` +*Also works for Celcius.* +```regex +Find: \*(f|F|c|C) +Replace: °$1 +``` +### Create an `˗ˏˋ effect ˎˊ˗` around text +*Wrap text in `('text')` to use this.* +```regex +Find: ^\('(.+)'\)$ +Replace: ˗ˏˋ $1 ˎˊ˗ +``` \ No newline at end of file