start と end の間のすべてを抽出する必要があります。
\n がない場合、以下のコードは機能します。
$mystring = "The start text always precedes \n the end of the text.";
if($mystring =~ m/start(.*?)end/) {
print $1;
}
o/p は次のようにする必要があります - テキストは常に \n
start と end の間のすべてを抽出する必要があります。
\n がない場合、以下のコードは機能します。
$mystring = "The start text always precedes \n the end of the text.";
if($mystring =~ m/start(.*?)end/) {
print $1;
}
o/p は次のようにする必要があります - テキストは常に \n