PHP » GoLang |
login |
register |
about
|
preg_replacepreg_replace[code] re := regexp.MustCompile("a(x*)b") fmt.Println(re.ReplaceAllString("-ab-axxb-", "T")) fmt.Println(re.ReplaceAllString("-ab-axxb-", "$1")) fmt.Println(re.ReplaceAllString("-ab-axxb-", "$1W")) fmt.Println(re.ReplaceAllString("-ab-axxb-", "${1}W")) [/code] |