you are here: codestackercodes [RSS]return the url base in ruby

return the url base in ruby

>> url = "http://www.codestacker.com/tag/ruby"
>> url[/https?:\/\/.[^\/]+/]
=> "http://www.codestacker.com"

Comments