List of metacharacters for MySQL regexp square brackets

前端 未结 2 2025
清歌不尽
清歌不尽 2020-12-21 15:00

Strangely I can\'t seem to find anywhere a list of the characters that I can\'t safely use as literals within MySQL regular expression square brackets without escaping them

2条回答
  •  眼角桃花
    2020-12-21 15:34

    From the documentation, right near the top:

    This section summarizes, with examples, the special characters and constructs that can be used in MySQL for REGEXP operations. It does not contain all the details that can be found in Henry Spencer's regex(7) manual page. That manual page is included in MySQL source distributions, in the regex.7 file under the regex directory.

    Said manpage can be found copied here (thanks, Google!). The information you're looking for is available in there.

提交回复
热议问题