in reply to Capture string that starts with #

If you are using bash then set -f is used to disable the expansion of metacharacter.