I have a string where I need to replace a regex wi...
# announcements
p
I have a string where I need to replace a regex with something that depends on a capture group, so I used
replace(input: CharSequence, transform: (MatchResult) -> CharSequence): String
. I’m now realizing though that this doesn’t have the same behavior as findAll. Is there something like findAll, that replaces all occurrences of a regex with the result of a closure? Apologizes if I worded that badly.