Regular Expressions in SQL

Learn about regular expressions in PostgreSQL, including how to use the REGEXP_MATCH and REGEXP_REPLACE functions, as well as various metacharacters.


Regular expressions, also known as regex or regexp, are powerful tools for manipulating text and data. In PostgreSQL, they can be used in the following commands:

  • The SELECT statements

  • The UPDATE statements

  • The DELETE statements

Get hands-on with 1200+ tech skills courses.