如何使用 MySql Regex inside locate?

How do use MySql Regex inside locate?

如果我尝试在 locate 中使用 Regex,它会失败

Select Locate(FieldA regexp '[a-z][A-Z][a-z]',Binary FieldA) from  PatternTester

根据 http://sqlfiddle.com/#!9/403c36/2.

如果我搜索明确的字母模式,它会正确找到它:

Select Locate('lC',Binary FieldA) from  PatternTester 

根据http://sqlfiddle.com/#!9/403c36/6

我需要做些什么来使 locate 'obey' Regex 还是根本就不会?

正如 mysql document 所说,LOCATE()returns the position of the first occurrence of substring substr in string st,因此它不会将任何正则表达式作为输入参数。

另外,通过检查您的 fiddle 参考资料,您在此版本中没有 REGEX_INSTR