To split a string delimited by a string, we can use below code snippet.
string[] questions = MyQuestions.Split(new string[] { "[Q]" }, StringSplitOptions.RemoveEmptyEntries); No need to user Regex or other methods.
This returns array, now you can loop through the array and get the split string
foreach (string q in questions)
{
<li>@q</li>
}
Thanks!