firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.28k stars 199 forks source link

Postgres query regex support #1813

Open banagale opened 2 years ago

banagale commented 2 years ago

Feature

Request is for a regex "flavor" of postgres, which has syntax differences from say, Python.

A query using a postgres regex looks like:

select count(*) from petstore where dba ~*'(\ypetco\y|petsmart)';

Where \y approximates \b in python.

working-name commented 2 years ago

https://www.postgresql.org/docs/9.3/functions-matching.html describes it as POSIX-like, with some pgsql specific things like choosing to use \y instead of \b, which may be due to the fact that \b is interpreted as a backspace, and \B as \ (backslash).