Mariadb Regexp_replace不应用UCASE/upper

发布于 2025-02-10 06:35:35 字数 187 浏览 3 评论 0原文

在查询中选择Regexp_replace('an an der Mauer','^([[:lower:]))',concat('\\ 1',' - ' - ',upper('\\ 1'))) ; 返回的结果是“ A-An der Mauer”,而不是我所期望的。我是做错了什么,还是这是Regexp-replace()函数中的错误?

In the query SELECT REGEXP_REPLACE('an Der Mauer', '^([[:lower:]])', CONCAT('\\1', '-', UPPER('\\1')));
the result returned is 'a-an der Mauer', not 'a-An der Mauer' as I would expect. Am I doing something wrong, or is this a bug in the REGEXP-REPLACE() function?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥抱没勇气 2025-02-17 06:35:35

昨天晚上真的为时已晚!当然,在评估\\ 1之前,将upper()应用于'\\ 1'。因此,由于每个参与角色都是其自己的大写版本以及其自己的小写版本,因此没有任何可见的情况。
只要我不能以函数参考作为函数参考,我就需要以不同的方式解决此问题。

It was really too late yesterday evening! Of course, UPPER() is applied to '\\1' before \\1 is evaluated. Therefore, since each of the participating characters is its own uppercase version as well as its own lowercase version, nothing visible happens.
As long as I cannot pass UPPER as a function reference I need to resolve this problem differently.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文