XMLPARSER:
私はエンディングに続く空白の任意の数を含めることができ、すべての文字列を置換しようとしています「;」、とだけ「;」私はので、複数の空白スペースで混乱しています。
"ExampleString1 ;" -> "ExampleString1;"
"ExampleString2 ;" -> "ExampleString2;"
"ExampleString3 ;" -> "ExampleString3;"
"ExampleString1 ; ExampleString1 ;" -----> ExampleString1;ExampleString1
私はこのような試みている:example.replaceAll("\\s+",";")
しかし、問題は、複数の空白スペースと、その混乱に私ができることです
竹:
これで試してみてください:
replaceAll("\\s+;", ";").replaceAll(";\\s+", ";")