Skip to content

Instantly share code, notes, and snippets.

@andrewp-as-is
Last active September 21, 2023 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewp-as-is/110d66d6075f1b8ec6503b8624d0f238 to your computer and use it in GitHub Desktop.
Save andrewp-as-is/110d66d6075f1b8ec6503b8624d0f238 to your computer and use it in GitHub Desktop.
emoji remove
#!/usr/bin/env python
import re
s = 'word1 :blush: word2'
print(re.sub(':[^:]+:', '', s).strip())
#!/usr/bin/env bash
echo "word1 :blush: word2" | sed 's/:.*://'
echo ":blush: word2" | sed 's/:.*://' | sed "s/^[ \t]*//" | sed 's/[ \t]*$//'
@hinell
Copy link

hinell commented Sep 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment