Skip to content

Instantly share code, notes, and snippets.

@ptsgrn
Last active March 3, 2026 10:32
Show Gist options
  • Select an option

  • Save ptsgrn/f1a9f3fa7526b5a10441e22663621b01 to your computer and use it in GitHub Desktop.

Select an option

Save ptsgrn/f1a9f3fa7526b5a10441e22663621b01 to your computer and use it in GitHub Desktop.
Grel function for cleaning HTML text from Thai bank's emails
value.replace(/<[^>]*>/,"").replace("-->", "").replace("&nbsp;", " ").replace(/[\t ]+/," ").replace(/(\r\n\s?|\n\s?)+/, "\n").replace(/\n\s/,"\n").replace(/\n([\d\.\,K]+)/, " : $1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment