如何从下面的字符串中拆分多个引号

时间:2013-06-21 11:40:37

标签: java sql

如何从此字符串中拆分多个引号?请帮助我,我的项目因此而停留在这里。

strLine1.trim().equalsIgnoreCase("Header Perceived Severity="":Friendly Name="":Alarm Type="":Specific Problems="":Event Date and Time="":Clearing Status="":Clearing Time="";");

1 个答案:

答案 0 :(得分:2)

您的代码无法编译:

strLine1.trim().equalsIgnoreCase("Header Perceived Severity="":Friendly Name="":
    Alarm Type="":Specific Problems="":Event Date and Time="":
    Clearing Status="":Clearing Time="");
  1. 最后错过了结束括号。
  2. 你需要逃避引用
  3. 最后再添加一个引文
  4. strLine1.trim().equalsIgnoreCase("Header Perceived Severity=\"\":Friendly Name=\"\":
        Alarm Type=\"\":Specific Problems=\"\":Event Date and Time=\"\":
        Clearing Status=\"\":Clearing Time=\"\"");