Skip to content

Instantly share code, notes, and snippets.

View AnthonyCarl's full-sized avatar

Anthony Carl AnthonyCarl

View GitHub Profile
@AnthonyCarl
AnthonyCarl / main.cs
Created November 4, 2017 00:34
UAParser Test
using System.Linq;
using System;
using UAParser;
string uaString = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063";
// get a parser with the embedded regex patterns
var uaParser = Parser.GetDefault();
// get a parser using externally supplied yaml definitions
// var uaParser = Parser.FromYamlFile(pathToYamlFile);