Fix regex for hashes.