-
Notifications
You must be signed in to change notification settings - Fork 18k
regexp: confusing ReplaceAllString result when using patterns like $1_$2
#68712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
From the Expand documentation:
Since the underscore Unfortunately I think it's not possible to insert a Anyway I think this is working as documented. |
$1_$2
It is possible to insert |
谢谢, 看了文档,做了下改动 ${1}_${2} |
Nice! Closing. |
Go version
go version go1.20.3 windows/amd64
Output of
go env
in your module/workspace:What did you do?
我想将驼峰的字符串中间插入一个下划线,可是并没有达到预期
问题复现链接
What did you see happen?
输入参数:cNcHDhCh
程序结果:NHDCh
What did you expect to see?
预期:c_Nc_HDh_Ch
The text was updated successfully, but these errors were encountered: