Skip to content

Instantly share code, notes, and snippets.

@linuxbender
Created September 25, 2011 20:21
Show Gist options
  • Select an option

  • Save linuxbender/1241101 to your computer and use it in GitHub Desktop.

Select an option

Save linuxbender/1241101 to your computer and use it in GitHub Desktop.
Regex Search Kanton Table
var pattern = @"^Sl[A-Z]{1}";
var stringSearch = "SlKanton";
var demo = Regex.Match(stringSearch, pattern);
Console.WriteLine("Wurde der Wert gefunden ? : {0} der wert is : {1}",demo.Length ,demo.Value);
if (demo.Success)
{
Console.WriteLine(stringSearch.Remove(demo.Index, demo.Length - 1));
}
Console.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment