From: daz Date: 2005-07-14T04:45:52+09:00 Subject: Re: Regex back reference in gsub Dan Fitzpatrick wrote: > > [...] This is reworked with the backslash backrefs I mentioned: res = str.gsub(/([\s|\>|\[|\(])((ftp:\/\/|http(s?):\/\/))([\w\.\?\/&=\-~:%]+)\b/i, '\1\5\6') > Thanks for the explanation. That works great. > > Dan > Y'welcome, daz