Modded regex for safer detection

Modded “already dense” regex for safer detection