donderdag, december 15, 2005

 

RegEx, split

Doel, tags en content splitsen in twee array´s

string[] s = Regex.Split("one{/tagje1/}t{wo{/tagje2/}banana", "{/[^/}]+/}");
System.Text.RegularExpressions.MatchCollection myCol = Regex.Matches("one{/tagje1/}t{wo{/tagje2/}banana", "{/[^/}]+/}");

twee regels code! pretty cool..