Search notes:

SQLite function: regexp

Search for records with regular expressions.
regexp is not a built in function, the functionality needs to be imported. In the SQLite shell, with a .load /usr/lib/sqlite3/pcre.so directive.
create table tq84_regexp (
  col text
);

insert into tq84_regexp values ('foo');
insert into tq84_regexp values ('twenty-two: 42');

--
-- pcre.so: needed for regexp--
--
.load /usr/lib/sqlite3/pcre.so

select col from tq84_regexp where col regexp '\d';
--
-- twenty-two: 42

select col from tq84_regexp where col regexp '(.)\1';
--
-- foo

drop table tq84_regexp;
Github repository about-sqlite, path: /functions/regexp.sql
In Ubuntu, pcro.so might be installed with
sudo apt-get install sqlite3-pcre

See also

Using regular expressions in PHP/sqlite.
SQL standard: the features F841, F842, F843, F844, F845 (like_regex, occurrences_regex, position_regex, substring_regex, translate_regex)
functions

Index