✅ Replace regex-pattern with dynamically generated string.
I have a text and a regex pattern. I want to take each of the substrings that match the pattern and replace them NOT with a constant string, but with a dynamically generated string from a method. For example, so that all occurrences are IEnumerable and I can use .Select()) to change each one so that they are overwritten in the initial text in the correct order. How can I do this?
2 Replies