I have a RichTextbox and I get the text within it as a string using this:
richTextBox2.Lines = richTextBox2.Lines
.Where(line => !line.Contains("any"))
.ToArray();
I split the lines and remove the ones containing the string "any".
I want to select certain lines containing another string, then insert a custom string after that. How can I do that?
line.Replacefor your old text to "old text + new text"