Skip to content

Instantly share code, notes, and snippets.

@sampatbadhe
Created June 7, 2018 02:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sampatbadhe/3103145f860a98bff6527ebbf7ab02ed to your computer and use it in GitHub Desktop.
Save sampatbadhe/3103145f860a98bff6527ebbf7ab02ed to your computer and use it in GitHub Desktop.
#
# https://stackoverflow.com/questions/50647999/how-to-remove-zero-width-space-characters-zwj-from-the-text
# U+200B zero width space
# U+200C zero width non-joiner Unicode code point
# U+200D zero width joiner Unicode code point
# U+FEFF zero width no-break space Unicode code point
#
text = text.gsub(/[\u200B-\u200D\uFEFF]/, '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment