LPS-39777 Optimize BrowserSnifferImpl to get rid of Regex