1
我有一个包含大量数据的像一个文件:找到具体的一条线,其下的{}(TCL)可
##########################################################
World is great
world has lots of counties
I am john who is staying in world
World {
abcd123 {
how are you
}
abcd456 {
how is life
}
abcd789 {
what are you doing
}
}
Hey going for moive
The life in this world is superb
#############################################
我想“世界”只喜欢 我想在目前的信息输出为:
abcd123 {
how are you
}
abcd456 {
how is life
}
abcd789 {
what are you doing
}
只有
。
没有时间好好回答,但'信息complete'将是有益的。 –
这类任务通常通过编写一个解析器来解决,该解析器逐个字符地扫描输入并维护状态机。对于这个任务,解析器不会很复杂。 – kostix
你怎么知道第一行(以“World”开头)并不重要,但第四行(以“World {”开头)是? – RHSeeger