擅长:python、mysql、java
<p>不太好看。效率不高。但它是有效的。你知道吗</p>
<pre><code>>>> import re
>>> regex = re.compile(r'#[0-9A-F]+')
>>>
>>> test_string = '#4A#61#76#61#53#63#72#69#70#74'
>>> for hex_string in re.findall(regex, test_string):
... test_string = test_string.replace(hex_string, chr(int(hex_string.replace('#', ''), 16)))
...
>>> test_string
'JavaScript'
</code></pre>
<p>如果有一个库或什么东西来处理这个编码方案,可能会有更好的方法,但因为它是我不认识它,所以我没有什么建议,但“暴力”。你知道吗</p>