Title / Description
Code public static string Decode(string s) { MatchCollection rr = Regex.Matches(s,@"(?:=\?)([^\?]+)(?:\?B\?)([^\?]*)(?:\?=)"); string charset = rr[0].Groups[1].Value; string data = rr[0].Groups[2].Value; byte[] b = Convert.FromBase64String(data); string res = Encoding.GetEncoding(charset).GetString(b); return res; }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code