function get_last_word($sentance){
$wordArr = explode(' ', $sentance);
$last_word = trim($wordArr[count($wordArr) - 1]);
runDebug( __FILE__, __FUNCTION__, __LINE__, "Sentance: $sentance. Last word:$last_word",4);
return $last_word;
}
{} 間のすべてのテキストを削除したい結果は次のようになります。
function get_last_word($sentance){}
私が試してみました
{+.*}
中括弧が同じ行にある場合にのみ機能します