split string with more than one Char in C# -


i want split string = "asaf_er_army" "er" seperator. split function of string doesn't allow split string more 1 char.

how can split string 'more 1 char' seperator?

it does. read here.

string source = "[stop]one[stop][stop]two[stop][stop][stop]three[stop][stop]"; string[] stringseparators = new string[] {"[stop]"};  // split string delimited string , return elements. string[] result = source.split(stringseparators, stringsplitoptions.none); 

edit: alternately, can have more complicated choices (regex). here, http://dotnetperls.com/string-split.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -