perl/bash question - html link out of text



I don't know how to modify the:

sed -r 's,.*(http://[^ \"$]+).*,<a href=\"\1\">\1</a>,'

command, to not just:
$ echo "test string http://somewhere.uk/ test" | sed -r 's,.*(http://[^
\"$]+).*,<a href=\"\1\">\1</a>,'
<a href="http://somewhere.uk/";>http://somewhere.uk/</a>

rather output this:
test string <a href="http://somewhere.uk/";>http://somewhere.uk/</a> test


can some perl/bash gods help me? :)

--
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



Relevant Pages

  • perl/bash question - html link out of text
    ... I don't know how to modify the: ... command, to not just: ... test string;>http://somewhere.uk/ test ... can some perl/bash gods help me? ...
    (Ubuntu)
  • perl/bash question - html link out of text
    ... command, to not just: ... test string;>http://somewhere.uk/ test ... can some perl/bash gods help me? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Possible bug in gosub vars
    ... variable VAR's value is test string (the backticks are interpreted, i.e., ... Once that's done the command calling TEST is ... "gosub test test string", i.e., there are TWO parameters in the command ... the slash working correctly. ...
    (comp.os.msdos.4dos)
  • Re: perl/bash question - html link out of text
    ... At 18:07 on 07 Mar 2010, Vadkan Jozsef wrote: ... command, to not just: ... test string;>http://somewhere.uk/ ... Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines ...
    (Fedora)
  • Re: perl/bash question - html link out of text
    ... command, to not just: ... test string;>http://somewhere.uk/ test ... -- mikecd on #Linux ...
    (Debian-User)