【发布时间】:2009-09-29 12:20:07
【问题描述】:
我正在使用这个简单的示例代码在 groovy 中读取文件
file.eachLine {line->
// do something with line
}
例如我的文件有一些这样的数据
blah blah blah
This is some more lines
more lines
Insert into something
(x1,x2,x3)
(Select * from
some table
where
something = something)
on rowid = something;
所以我想读一个sn-p。 如果我看到一行带有 rowid 的行,最后也有一个“分号”。然后我想读回'(select'
所以在阅读了这个文件后,我想要一个包含:
(Select * from
some table
where
something = something)
on rowid = something;
这可能吗?以及如何?
【问题讨论】:
标签: groovy filereader