in reply to Replacing numbers using regular expression

Do you just want to replace all digits in a string with # ? If so, try
s/\d/\#/g;
This turns 1234.5 into ####.#.

If this is not what you want to do, please explain in more detail.