I have a string and must extract all the substrings between 2 different words ('alpha' and 'beta'). I must return a json with two fields.

I tried in this way but it doesn't work correctly:

```
            string content = "string working on";
            var listSubString = new List<string>();
            int index = 0;
            do
            {
                index = content.LastIndexOf("alpha");
                if (index != -1)
                {
                    var length = content.IndexOf("beta");
                    string substring= content.Substring(index, length);
                    content = content.Replace(substring, string.Empty);
                    listSubString.Add(substring.Replace("alpha", string.Empty).Replace("beta", string.Empty));
                }
            } while (index != -1);
Content = content;
ListSubString = listSubString;

```

I'd like with a string like `"hello alpha I don't want this part 1 beta world alpha i don't want this part 2 beta have a nice day"` receive a json like `{Content : "hello world have a nice day, ListSubString : ["i don't want this part 1", "i don't want this part 2"]}`

Thanks for the help