Javad Abedi
Javad Abedi

Reputation: 512

Find and Split string in PostgreSQL

I have column in my table with data type varchar And that value is like a tag Example :

 <> e2=“69”  su=“58” fu=“55” <\>

I want search and find ‘su’ value and replace in that column

Upvotes: 0

Views: 78

Answers (1)

napentathol
napentathol

Reputation: 1753

I think this is what you are looking for: http://www.postgresqltutorial.com/regexp_replace/

In this case you will want to use something like

SELECT REGEXP_REPLACE(string, 'su="\d{2}"', 'su="value"')

Upvotes: 1

Related Questions