我有一个包含文本行的文本文件,如果下一行满足例如条件,我正在尝试将某行添加到列表框中
如果该行以 # 开头,则添加该行,如果下一行以 @ 开头,之后的所有行以 @ 开头
#add this line
@add this line
@add this line
@add this line
#dont add because the next line is not a @
#dont add because the next line is not a @
#dont add because the next line is not a @
#dont add because the next line is not a @
#add this line
@add this line
@add this line
#dont add because the next line is not a @
#add this line
@add this line
#add this line
@add this line
希望这使场景任何帮助都会很棒