Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Go regexp:如何用源模式中的具体值替换命名组?_Regex_Go - Fatal编程技术网

Go regexp:如何用源模式中的具体值替换命名组?

Go regexp:如何用源模式中的具体值替换命名组?,regex,go,Regex,Go,也许,你可以帮我 例如,我有像(?p\w+(.p\w+)这样的正则表达式 如何使用map[string]string{“name”:“Alice”,“name”:“Cool”}替换组以获得stringAlice Cool?有可能吗 谢谢。好的,我知道怎么做了。希望它能帮助别人

也许,你可以帮我

例如,我有像
(?p\w+(.p\w+)
这样的正则表达式

如何使用
map[string]string{“name”:“Alice”,“name”:“Cool”}
替换组以获得string
Alice Cool
?有可能吗


谢谢。

好的,我知道怎么做了。希望它能帮助别人