Fix regex patterns in keys