Skip to content

Instantly share code, notes, and snippets.

@brandonc
Last active December 15, 2015 05:29
Show Gist options
  • Save brandonc/5209210 to your computer and use it in GitHub Desktop.
Save brandonc/5209210 to your computer and use it in GitHub Desktop.
Examples for ex, the c# regex extension library: http://github.com/brandonc/ex
string beers = @"Bud Light Lime, Tecate, Fat Tire, Budweiser Clamato, Asahi, Budweiser Select";
beers.Scan(@"([\w\s]+),?\s*", (beername) => {
if(!beername.StartsWith("Bud")) {
Console.Writeline("I like {0}", beername);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment