[Proto-Scripty] Javascript + regex

2010-08-22 Thread johnwerry
Trying to get the following gsub call working to replace text of url with link of the url. I know I have to add slashes, but I am apparently missing some, somewhere as I can never get it to not error out. txt = txt.gsub(/\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)| ([^[:punct:]\s]|/)))/,'#{0}'

[Proto-Scripty] Re: Javascript + regex

2010-08-25 Thread johnwerry
August 2010 14:52, johnwerry wrote: > >> Trying to get the following gsub call working to replace text of url > >> with link of the url.  I know I have to add slashes, but I am > >> apparently missing some, somewhere as I can never get it to not error > >>