C
C#15mo ago
а

✅ 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
а
а15mo ago
Thank you! That's exactly what I need
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.