我有这样的台词
{\pos(830,575)}{\hide18}In the promise you made at all
我需要删除 \hide 标记,包括花括号
{\pos(830,575)}In the promise you made at all
但我的代码无法处理 '\' 字符
String s = line.replaceAll( "{" + "\" + "hide" + type + "}", "");
无论我写多少额外的'\'字符,它都不起作用,我得到非法重复
利用
请参阅示例代码和正则表达式演示。
细节
\{\\hide- 线{\hide[^{}]*- 0 个或多个字符,而不是{and}}-符号}。