Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想执行以下搜索请求
.where("url REGEXP ?", '^/gallery/\d+')
但是消毒剂会破坏表情,我明白了:
^/gallery/\\\\d+
在这种情况下如何强制跳过消毒?
在 where 条件下使用的重点?是清理字符串。
?
如果您使用的是特定于数据库的查询,最好在标签中提及它。我假设你想使用 MySQL REGEXP 函数。
如果您不想对其进行消毒,请写下:where("url REGEXP '^/gallery/\d+'")
where("url REGEXP '^/gallery/\d+'")