如何为结果字符串中的每个工作空间附加命名空间。所以最终输出将是
String namespace = "@{XYZ/1.0}categories:";
String result= "(\"workspace://123456\" AND \"workspace://55757575\")";
(@{XYZ/1.0}categories:"workspace://123456" AND @{XYZ/1.0}categories:"workspace://55757575");
答案 0 :(得分:0)
如何使用replaceAll
?
result.replaceAll("\\\"workspace:", namespace + "\"workspace:");