Re: perl or bash question ["convert strings in a txt to html links"]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vadkan Jozsef wrote:
> Turning:
> 
> http://website.org
> http://www.website.org
> 
> to this:
> 
> <a href=http://website.org>http://website.org</a>
> <a href=http://www.website.org>http://www.website.org</a>
> 

sed -e 's_\(\bhttp://\S*\)_<a href="\1">\1</a>_g'

Not perfect, as some characters should be urlencoded
inside the href.

-- 
   Roberto Ragusa    mail at robertoragusa.it
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux