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

txt = txt.gsub(/\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|
([^[:punct:]\s]|/)))/,'<a href="#{0}">#{0}</a>');

Here is the "add slashes" version of the first parameter, but this
errors out at runtime.  What am I missing?

/\\b(([\\w-] ://?|www[.])[^\\s()<>] (?:\\([\\w\\d] \\)|([^[:punct:]\

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to