我有一个像这样的文本:
hello world /* select a from table_b
*/ some other text with new line cha
racter and there are some blocks of
/* any string */ select this part on
ly
////RESULT rest string
这段文本跨越多行,我需要提取从最后一个出现的 "*/" 到 "////RESULT" 之间的内容。在这种情况下,结果应该是:
select this part on
ly
如何在Perl中实现这个功能?
我尝试了\\\*/(.|\n)*////RESULT
,但这将从第一个“*/”开始匹配。