C
C#2y 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
.
.OP2y ago
Thank you! That's exactly what I need
Accord
Accord2y 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.
Want results from more Discord servers?
Add your server