C# How do I split a string by strings and include the delimiters?
Posted
by mafutrct
on Stack Overflow
See other posts from Stack Overflow
or by mafutrct
Published on 2010-03-20T21:50:49Z
Indexed on
2010/03/20
22:11 UTC
Read the original article
Hit count: 152
c#
|string-split
There are many similar questions, but apparently no perfect match, that's why I'm asking.
I'd like to split a random string (e.g. 123xx456yy789
) by a list of string delimiters (e.g. xx
, yy
) and include the delimiters in the result (here: 123
, xx
, 456
, yy
, 789
).
Good performance is a nice bonus. Regex should be avoided, if possible.
© Stack Overflow or respective owner