Eg: Google site http://www.google.com
output: http://www.google.com
Eg: Yahoo site www.yahoo.com
output: www.yahoo.com
views:
53answers:
3
+1
A:
I think this tutorial:
http://java-programming.suite101.com/article.cfm/how_to_get_url_parts_in_javascript
should answer your questions and provide some code examples.
Hope that helps!
Mark Mayo
2010-06-02 11:34:47
eg: some text some text http://abc.com some text testoutput: http://abc.com
2010-06-02 11:51:56
yes, that should do it, look at the section on splitting and rebuilding URLs.
Mark Mayo
2010-06-02 14:17:56
A:
Split the string where there is a space and identify the segments that are URLs using regular expressions.
http://stackoverflow.com/questions/206059/php-validation-regex-for-url
Simon Brown
2010-06-02 11:40:17
You do realize that php and javascript use different "flavors" of regex? http://www.regular-expressions.info/refflavors.html
fudgey
2010-06-12 16:51:00