2017-04-02から1日間の記事一覧

数値文字参照を文字に変換するPythonスクリプト

import re def conv(s): cs = [] for e in re.findall("&#x([0-9a-fA-F]+);", s): cs.append(chr(int(e, 16))) return "".join(cs) def main(): s = "ファイルまたはアセンブリ" p…