skip to Main Content

reg_replace in PostgreSql with pattern matching

I have below dataset, 1. '{SHEET,2730377,SHEET,5708283,DATA,3015937}' 2. '{SHEET,2730377,SHEET,5708283,DATA,3015937,DATA,0010965}' 3. '{SHEET,5708283,DATA,3015937,DATA,0010965}' 3. '{SHEET,5708283,DATA,3015937}' I need the result as, 1. {DATA,3015937} 2. {DATA,3015937,DATA,0010965} 3. {DATA,3015937,DATA,0010965} 4. {DATA,3015937} Basically I wanted to replace SHEET followed by 7 digit number and extract only DATA…

VIEW QUESTION
Back To Top
Search