我在超级用户上发布了这个问题,我被建议在stackoverflow上发布这个问题.
我真的很喜欢vim,今天我遇到了有趣的问题,我认为可以通过regexp完成,但我无法形成正确的问题.
我有一个非常大的sql文件.它整合了许多不同的查询.文件包含以下内容:
select * from hr.employees, oe.orders, oe.order_items select * from hr.employess, oe.orders, hr.job_history select * from oe.customers, oe.orders, hr.employees select * from hr.employees, hr.departments, hr.locations
如何只选择那些只有一行匹配hr.
的行?例如,上面它将是第一行和第三行.