<?php

$str = '[id155878967:bp-169031445_52|Василий], это ответ на комментарий';
echo preg_replace('/\[.*\|(.*)\](.*)/', '$1$2', $str);