I hate seeing nearly every directory in my repository list each file twice, once with a dot in front of it and once without. I tried adding .* to my .hgignore file,
.*
I use this in my .hgignore:
.hgignore
syntax: regexp # dotfiles (?
Which reads: periods not preceded by something other than a forward slash.
Ry4an's solution is also good, I've used that one before too. Not sure which is more efficient.
https://regex101.com/r/dB4bW7/1