Forums: Rockclimbing.com: Suggestions & Feedback:
Automatically create URL
RSS FeedRSS Feeds for Suggestions & Feedback

Premier Sponsor:

 


truello


Nov 28, 2007, 6:09 PM
Post #1 of 3 (1351 views)
Shortcut

Registered: Oct 1, 2006
Posts: 737

Automatically create URL
Report this Post
Average: avg_1 avg_2 avg_3 avg_4 avg_5 (0 ratings)  
Can't Post

It isn't that difficult? Tongue Here, I even found a good regular expression to use:

\w+://(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+\w{2,4}(:[\d]+)?(/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-;+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?

This will avoid posts where someone says http://www.google.com and then someone replies fixed: http://www.google.com.

I should mention that the regex is for JavaScript, not PERL.


(This post was edited by truello on Nov 28, 2007, 6:16 PM)


ddt


Nov 28, 2007, 8:32 PM
Post #2 of 3 (1338 views)
Shortcut

Registered: May 21, 2005
Posts: 2304

Re: [truello] Automatically create URL [In reply to]
Report this Post
Average: avg_1 avg_2 avg_3 avg_4 avg_5 (0 ratings)  
Can't Post

 
We already have the mark-up function, which is quite easy to use. It also leaves some flexibility, for the odd case where a non-clickable URL needs to be posted.

DDT


percious


Dec 16, 2007, 8:48 PM
Post #3 of 3 (1280 views)
Shortcut

Registered: May 19, 2005
Posts: 140

Re: [truello] Automatically create URL [In reply to]
Report this Post
Average: avg_1 avg_2 avg_3 avg_4 avg_5 (0 ratings)  
Can't Post

truello wrote:
It isn't that difficult? Tongue Here, I even found a good regular expression to use:

\w+://(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+\w{2,4}(:[\d]+)?(/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-;+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?

This will avoid posts where someone says http://www.google.com and then someone replies fixed: http://www.google.com.

I should mention that the regex is for JavaScript, not PERL.

+1


Forums : Rockclimbing.com : Suggestions & Feedback

 


Search for (options)

Log In:

Username:
Password: Remember me:

Go Register
Go Lost Password?



Follow us on Twiter Become a Fan on Facebook