<?php

$text = "1st line\n#test line this \nline #new line\naaaa #aaaa\nbbbbbbbbbbb#\ncccccccccccc\n#ddddddddd"; 
preg_match_all("/^#(.*)$/m",$text,$m);
print_r($m[0]);