Re: Find and replace

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: Find and replace
Дата
Msg-id AC2EAA90-71F4-4125-8EEC-2A916B72E48E@gmail.com
обсуждение исходный текст
Ответ на Find and replace  ("Campbell, Lance" <lance@illinois.edu>)
Список pgsql-sql


On Sep 11, 2019, at 2:24 PM, Campbell, Lance <lance@illinois.edu> wrote:

PostgreSQL 10.x
 
I don’t know the best way to do this.  I need to do a find and replace in text fields.  The value I need to find and replace may occur more than once in each field per record. 
 
The value I am trying to match on:
Starts with a single { .
Ends with a single } .
In between these brackets can be the characters 0-9, a-z, A-Z, hyphens and underscores.  But no spaces.  These characters could be in any order.
The replacement value on a match is the same as what was found except for double {{ at the beginning and double }} at the end.  Same values between the brackets as what was matched on.
 
Example:
{ab_1D3-4} becomes {{ab_1D3-4}}
 
Thanks for helping me with this.
 
Lance Campbell
University of Illinois

Are there curly braces which don’t start/end such strings?  If not it might be easier to just double them up?


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Campbell, Lance"
Дата:
Сообщение: Find and replace
Следующее
От: "Campbell, Lance"
Дата:
Сообщение: Re: Find and replace