提取长文本的一部分

时间:2016-09-28 01:19:53

标签: java string split

请考虑我们有String

    String Description="{"DN":"Systems and Software Verification: Model-Checking Techniques and Tools","D":"Model checking is a powerful approach for the formal verification of software. It automatically provides complete proofs of correctness, or explains, via counter-examples, why a system is not correct. Here, the author provides a well written and basic introduction to the new technique. The first part describes in simple terms the theoretical basis of model checking: transition systems as a formal model of systems, temporal logic as a formal language for behavioral properties, and model-checking algorithms. The second part explains how to write rich and structured temporal logic specifications in practice, while the third part surveys some of the major model checkers available.","S":[{"Ty":1,"U":"http://dl.acm.org/citation.cfm?id=1965314"},{"Ty":1,"U":"http://ci.nii.ac.jp/ncid/BA52610493"}]}";

我想要做的是提取这个字符串:

"Model checking is a powerful approach for the formal verification of software. It automatically provides complete proofs of correctness, or explains, via counter-examples, why a system is not correct. Here, the author provides a well written and basic introduction to the new technique. The first part describes in simple terms the theoretical basis of model checking: transition systems as a formal model of systems, temporal logic as a formal language for behavioral properties, and model-checking algorithms. The second part explains how to write rich and structured temporal logic specifications in practice, while the third part surveys some of the major model checkers available."

使用:

String text=Description.split("D"+":").toString();

不起作用,即使这样,在没有必要的文本之后也会出现无用的字符。怎么办?

0 个答案:

没有答案