convert PCRE regular expression to mysql query regular expression

前端 未结 2 2055
花落未央
花落未央 2021-01-16 13:03

I have below regular expression

^(?!\\d+$)(?!(?:[^$&%@]*[$&%@]){4})(?!.*\\b\\w{11}).{3,}$

it is working fine in PHP

I want

2条回答
  •  梦谈多话
    2021-01-16 13:31

    The work around is to use preg-like MySQL UDF Library that has more complex REGEXP than the native MySQL's own.

    https://github.com/mysqludf/lib_mysqludf_preg

    and you can type the above in the link below to get Perl version of the expression that will work directly with the udf

    https://regex101.com/r/wU8uM7/22/codegen?language=javascript

提交回复
热议问题