Suppose, I have the following string:
string temp = "some string contains text which contains demo";
string result = RemainingString(temp, 12, 8); // string, startIndex, length
The result string I need should look as follows:
some string text which contains demo
Note, that the word contains is removed from first place only.
Update: I personally want to achieve this using regular expression explicitly.
Here’s a solution using regular expressions: