mysql 正则查询信息,该如何处理
Jun 13, 2016 pm 01:12 PM
mysql 正则查询信息
我想查询带有中括号的数据 如 参加合约计划即可优惠200-1000元。[嘻嘻]有意联系
他就有'[ ]'这个 !但是我
SELECT *
FROM `topic_comment`
WHERE content
REGEXP '\[(.*)+\]'
这样查询感觉怎么没用啊
------解决方案--------------------
SELECT *
FROM `topic_comment`
WHERE content
REGEXP '\\[.*\\]'
------解决方案--------------------
严重错误的做法!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Asynchronous processing method of Select Channels Go concurrent programming using golang

How to hide the select element in jquery

How to implement change event binding of select elements in jQuery

A Practical Guide to the Where Method in Laravel Collections

How to use the Where method in Laravel collections

What is the reason why Linux uses select?

From beginner to proficient: Master the skills of using is and where selectors
