Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有转义希伯来字符的字符串,例如,我的字符串包含这些十六进制值:
%d7%90%d7%94%d7%95%d7%93%d7%a8%d7%9d
代表:
אהודרם
是否有一个正则表达式可以应用于该字符串,以返回其实际的希伯来语字符?
String s = URLDecoder.decode("%d7%90%d7%94%d7%95%d7%93%d7%a8%d7%9d", "UTF-8");
正则表达式没有函数回调是不可行的:每个 %xx 都需要成为多字节 UTF-8 序列中的一个字节。