Find and replace - regexp replace (PostreSQL)

From ben.goodacre.name/tech

Jump to: navigation, search

The regexp_replace function allow 'find and replace' functionality within fields in Postgres.

Syntax: regexp_replace( field, E'regex-string', 'new-string');

Example

update table set field=regexp_replace(field, E'old-text', 'new-text');
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox