How do I use regex in a SQLite query?

后端 未结 17 1745
暖寄归人
暖寄归人 2020-11-22 05:57

I\'d like to use a regular expression in sqlite, but I don\'t know how.

My table has got a column with strings like this: \"3,12,13,14,19,28,32\" Now if I type \"whe

17条回答
  •  悲哀的现实
    2020-11-22 06:30

    If you are using php you can add any function to your sql statement by using: SQLite3::createFunction. In PDO you can use PDO::sqliteCreateFunction and implement the preg_match function within your statement:

    See how its done by Havalite (RegExp in SqLite using Php)

提交回复
热议问题