我找不到解决这个简单问题的方法。
我想用 "替换两个连续的 '' 或 ``。
Input:
some ``text'' dspsdj
Out:
some "text"
为什么:
s.replaceAll("[`{2}'{2}]", "\"")
Out:
some ""text""
???
谢谢
最佳答案
你应该这样做:
s.replaceAll("``|''", "\"")
你可能打算在这里做的是:
s.replaceAll("[`']{2}", "\"")
但这并不完全正确
关于java - 替换两个引号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10580985/