本文介绍了MySql REGEXP运算符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mySql REGEXP运算符不区分大小写.此操作符的版本是否 区分大小写?

The mySql REGEXP operator is not case sensitive. Is there a version of this operator that is case sensitive?

推荐答案

使用BINARY关键字,该关键字强制REGEXP将字符串作为二进制字符串进行匹配,区分大小写.

Use the BINARY keyword, which forces REGEXP to match the string as a binary string, which is done case-sensitively.

SELECT 'a' REGEXP 'A', 'a' REGEXP BINARY 'A';

尽管文档中没有明确 08-16 00:32