I had a copy of /etc/hosts.deny that I wanted to format up to extract the hostnames from… Every other line started with a comment, though, and I wanted to strip those…
:g/#/d
Will match all lines (:g) which contain (not necessarily “start with”) # and delete (d) them.