[GENERAL] regexp_replace question / help needed

2015-12-10 Thread Christopher Molnar
Hello, I am running into a problem and need some pointers on regexp_replace - I can't seem to find an answer in any of the online resources. I have a string (like 40,000 with different length and number of components) of them in a field named "externalurl". I need to replace the final "/" of the

Re: [GENERAL] regexp_replace question / help needed

2015-12-10 Thread David Rowley
On 10 December 2015 at 10:56, Christopher Molnar wrote: > Hello, > > I am running into a problem and need some pointers on regexp_replace - I > can't seem to find an answer in any of the online resources. > > I have a string (like 40,000 with different length and number of >

Re: [GENERAL] Regexp_replace question / help needed

2015-12-09 Thread Nicolas Paris
Hi, I guess capture will help you look at http://www.postgresql.org/docs/9.0/static/functions-matching.html SELECT regexp_replace('http://test.com/test/testfile.php', '^(.*)/(.*\.php)$', E'\\1=\\2', 'g') 2015-12-09 22:58 GMT+01:00 Christopher Molnar : > Hello, > > I

Re: [GENERAL] Regexp_replace question / help needed

2015-12-09 Thread Tom Lane
Christopher Molnar writes: > I have a string (like 40,000 with different length and number of > components) of them in a field named "externalurl". I need to replace the > final "/" of the string with "=" while preserving the filename and > extension following the

Re: [GENERAL] Regexp_replace question / help needed

2015-12-09 Thread Jerry Sievers
Christopher Molnar writes: > Hello, > > I am running into a problem and need some pointers on regexp_replace - I > can't seem to find an answer in any of the online resources. > > I have a string (like 40,000 with different length and number of components) > of

[GENERAL] Regexp_replace question / help needed

2015-12-09 Thread Christopher Molnar
Hello, I am running into a problem and need some pointers on regexp_replace - I can't seem to find an answer in any of the online resources. I have a string (like 40,000 with different length and number of components) of them in a field named "externalurl". I need to replace the final "/" of the

Re: [GENERAL] Regexp_replace question / help needed

2015-12-09 Thread Christopher Molnar
Thank you both. Problem solved - worked perfectly. On Wed, Dec 9, 2015 at 5:41 PM, Jerry Sievers wrote: > Christopher Molnar writes: > > > Hello, > > > > I am running into a problem and need some pointers on regexp_replace - I > can't seem