| От | Craig Ringer |
|---|---|
| Тема | Re: find and replace the string within a column |
| Дата | |
| Msg-id | 4C9C8CB4.3070205@postnewspapers.com.au обсуждение исходный текст |
| Ответ на | find and replace the string within a column (Nicholas I <nicholas.domnic.i@gmail.com>) |
| Ответы |
Re: find and replace the string within a column
|
| Список | pgsql-sql |
On 24/09/2010 5:15 PM, Nicholas I wrote: > Example: > table name person: > > name > ------------------------------------ > Samuel (S/o Sebastin ) > ------------------------------------- > > remove the word within the brackets. > the output should be , Samuel. Can't you just regexp_replace, matching \([^)]+\) (in other words "an open parenthisis, then a sequence of one or more of any character other than a close parenthesis, followed by a close parentheis) and replacing with an empty string ? -- Craig Ringer Tech-related writing at http://soapyfrogs.blogspot.com/
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера