It looks to me like you just have to get $match[1]:
php > $file = "1232#hello world#";
php > preg_match("/1232\\#(.*)\\#/", $file, $match);
php > print_r($match);
Array
(
[0] => 1232#hello world#
[1] => hello world
)
php > print_r($match[1]);
hello world
Are you getting different results?