MariaDB regex working in online regex testers does not work in SELECT WHERE REGEXP

后端 未结 2 652
迷失自我
迷失自我 2021-01-12 15:16

I\'m having a problem a dataset I have been given in bad format E.G fullName column and no breakdown of names I\'m wanting to search where any of the names star

2条回答
  •  不要未来只要你来
    2021-01-12 15:50

    You may use

    REGEXP '\\bJ'
            ^^^
    

    Here, the \b is a word boundary that will force a match only when J is not preceded with a letter, digit or _.

    The \ is doubled because the regex engine expects a literal \, and two backslashes are required.

提交回复
热议问题