Seems you should turn your logic around, and match the comment:
/^\s*#/
Your regex should have a plus instead of a star after \s:
And apparently <strike> doesn't span code blocks.
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: regex whitespace quantifers
by QM
in thread regex whitespace quantifers
by halak77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |