我有一个涵盖多行的字符串。我需要提取两个字符串之间的文本。例如:
Start Here Some example
text covering a few
lines. End Here
我需要提取字符串,
Start Here Some example text covering a few lines.
我该怎么做?
最佳答案
print $1 if /(Start Here.*?)End Here/s;
关于regex - 使用 Perl 从多行字符串中提取文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6764350/