{"repo":"petere/pgpcre","free":true,"listed":false,"github":"https://github.com/petere/pgpcre","clone":"git clone https://github.com/petere/pgpcre.git","description":"PCRE functions for PostgreSQL","language":"C","stars":30,"topics":["postgresql","postgresql-extension","regular-expression","pcre","perl"],"license":null,"category":"databases-storage","readme_excerpt":"pgpcre This is a module for PostgreSQL that exposes Perl-compatible regular expressions (PCRE) functionality as functions and operators. It is based on the popular PCRE library. Installation You need to have libpcre installed. pkg-config will be used to find it. To build and install this module: make make install or selecting a specific PostgreSQL installation: make PG CONFIG=/some/where/bin/pg config make PG CONFIG=/some/where/bin/pg config install And finally inside the database: CREATE EXTENSION pgpcre; Using A regular expression is a separate data type, named pcre . (This is different from how the built-in regular expressions in PostgreSQL work, which are simply values of type text .) The supported regular expressions are documented on the pcrepattern(3) man page. Basic matching Boolean operators are available for checking whether a pattern matches a string. These operators return true or false, respectively. They only return null when one of the operands is null. Examples: SELECT 'foo' pcre 'fo+'; SELECT 'bar' ! pcre 'fo+'; You can also write it the other way around: SELECT pcre 'fo+' 'foo'; SELECT pcre 'fo+' ! 'bar'; This can be handy for writing things like SELECT pcre 'fo+' ANY(ARRAY['foo', 'bar']); For Perl nostalgia, you can also use this operator: SELECT 'foo' = pcre 'fo+'; And if this operator is unique (which it should be, unless you have something else installed that uses it), you can also write: SELECT 'foo' = 'fo+'; (The operator, by contrast, is not unique, o","default_branch":null,"files":null,"tree":[],"storefront":"/r/petere","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/petere/pgpcre/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}