1

什么是在可能以 HTTP 或 HTTPS 开头的字符串中查找 URL 的好方法?

例如:

Here is some text. It has one url here: www.example.com. It also has other link 
that goes to http://foo.bar.net and then some more text.

什么是找到 URL 的好方法?

我最关心的是“.com”、“.net”、“.org”、“.gov”、“.edu”和“.us”。

我正在使用 Ruby 1.9.3。

4

0 回答 0