3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\[\s*([^][|]*?)\s*\|\s*([^][]*?)\s*]/m'; $str = 'RE: Reply to me [Quote #341 | some-site]'; if (preg_match($re, $str, $match)) { array_shift($match); print_r($match); }

preferences:
27.6 ms | 406 KiB | 5 Q