Trouble here- javascript to finde a text string on the same page

i need a very simple script that can find a string that beings with (# – on the same page as the script is located.

ultimately i then need get the whole string part (# 123456) and extract the number.

would anyone have a javascript solution for this?