Hi & thanks for looking!
In C#, I have a string coming into a method that is delimited by a pattern like this:
some text ;#1;# some more text ;#2;# even more text
I would like to split the spring based on these patterns (;#1;#).
Is it possible to split based on multiple characters? If so, how would I handle for the number in the middle of the delimiter?
Note: In some cases, there may be a double or even tripple digit in the delimiter. For example, ;#10;# or ;#123;#.
Any help would be GREATLY appreciated!
Thanks!
You can use Regex.Split(string s, string pattern) method. The pattern you need is
";#[0-9]+;#"