只是想知道,从字符串中的标题中提取信息的最佳方法是什么。例如,This: is the first line of a String: xx-string: This is a long String
This is the summary of the String
This is the first heading
This is another heading摘要,标题1,标题2Summary
但是,当我在文件被更改后打开它时,所有的目录列表都在一行上,但是它们需要是每一行一个目录。我试着把每一行都保存到数组列表中,然后像这样打印出来,但这似乎对我没有用,所以我想知道是否有人能帮忙呢?P.S.一直在试图让它正常工作,现在又遇到了另一个问题,现在它正在将它们全部打印成一行,但中间有空格,例如:public class copy
private String