After open an text file, i need to use perl to do the following thing:
Recognize a normal HTTP URL and turn it into a link to itself,
e.g. http://www.yahoo.com/
?lt;/SPAN> <a href=“http://www.yahoo.com/?amp;gt;http://www.yahoo.com/</a>
Assume that the HTTP URL has form http://hostname/path where the path part
is optional. The path part of a URL can consists of a variety of characters:
[-a-zA-Z0-9_:@&?=+,.!/~*%$]. The hostname contains words that are
separated by dots. The dots are strict separators which means that there
must be something in between for them to separate, e.g. yahoo..com is not a
valid hostname. The possible alternatives for the last part of the host name
are: com|edu|gov|mil|net|org|biz|info|name or any 2 letters in small case (a-z).
Can anyone help me? Thx
Recognize a normal HTTP URL and turn it into a link to itself,
e.g. http://www.yahoo.com/
?lt;/SPAN> <a href=“http://www.yahoo.com/?amp;gt;http://www.yahoo.com/</a>
Assume that the HTTP URL has form http://hostname/path where the path part
is optional. The path part of a URL can consists of a variety of characters:
[-a-zA-Z0-9_:@&?=+,.!/~*%$]. The hostname contains words that are
separated by dots. The dots are strict separators which means that there
must be something in between for them to separate, e.g. yahoo..com is not a
valid hostname. The possible alternatives for the last part of the host name
are: com|edu|gov|mil|net|org|biz|info|name or any 2 letters in small case (a-z).
Can anyone help me? Thx