regex collection's key can define type now