开发者

How do I match string till end of text file?

开发者 https://www.devze.com 2023-03-31 18:14 出处:网络
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?

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

精彩评论

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