removed str_replace for regex, added lookup-cache for matchUAAgainstKey