Preg_replace_callback Golang Version

I am wondering if there is any function which can behave like:
preg_replace_callback (PHP function)

Replacing based on a function.

Sure. See regexp.ReplaceAllFunc or regexp.ReplaceAllStringFunc for example.

https://golang.org/pkg/regexp/

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.