regexp_replace
От | Andy Colson |
---|---|
Тема | regexp_replace |
Дата | |
Msg-id | 5697FA5F.2020703@squeakycode.net обсуждение исходный текст |
Ответы |
Re: regexp_replace
Re: regexp_replace Re: regexp_replace |
Список | pgsql-general |
Hi all. This is not doing as I'd expected: select regexp_replace('71.09.6.01.3', '(\d)[.-](\d)', '\1\2', 'g'); regexp_replace ---------------- 71096.013 (1 row) It acts the same with dashes: select regexp_replace('71-09-6-01-3', '(\d)[.-](\d)', '\1\2', 'g'); regexp_replace ---------------- 71096-013 (1 row) I cannot use translate because there is other text in the field. I'm trying to strip masking characters from a parcel number in a larger text field (for example: "the parcel 12-34-56 has caught on fire") I seem to be missing something, any hints? I'm on PG 9.3.9 on Slackware64. Thanks for your time, -Andy
В списке pgsql-general по дате отправления: