开发者

How do I match string till end of text file?

In this line of code I want it to match the string from 'Review Notes \50optional\51' till the end of the text fi开发者_开发知识库le. How can I do this?

reviewNotes = contents.match(/Review Notes \50optional\51\n==================(.*?)/m)[1].strip


Review Notes \50optional\51.*$


if subject =~ /Review Notes \\50optional\\51.*\z/m
    match = $&
else
    match = ""
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜