protected string[] MatchUserAgent(string regex) { // only match if useragent begins with given regex or there is no letter before it var match = regexEngine.Matches(userAgent, FixUserAgentRegEx(regex)); return(match.ToArray()); }