some really insane regexp tweaks