【发布时间】:2015-12-12 15:22:53
【问题描述】:
Here,我问如何匹配一个字符串后的下一行。
有时,我的 PDF 包含一些扭曲我的结果的空格。例如,有时我有:
Title:
this is the text I'd like to extract
Not this one
Neither this
(here my code works well)
有时,它的格式如下:
Title:
this is the text I'd like to extract
Not this one
Neither this
这是我在 Ruby 中的正则表达式:
^(?<=Title:\n)([^\n]+$)
如果我的匹配文本是 cacharecters [原文如此](文本或数字)而不是空格,我如何让正则表达式提取下一行?
【问题讨论】: