Re: perl or bash question ["convert strings in a txt to html links"]
On 27/02/10 17:12, Vadkan Jozsef wrote:
How can I do that in bash or perl, that I have a txt file, e.g.:
Hi, this is the content of the txt file, that contains links like this:
http://www.somewhere.it/, and it could contain: http://somewhere.com,
This is the second line, that doesn't contains links..
This is the XYZ line, that contains a link: http://www.somewhere.net
...ok.. so how could I make a regexp for this?
The solution would be:
sed 'SOMEMAGIC' file.txt> file.html
perl 'SOMEBIGMAGIC' file.txt> file.html
Hmm, hardly on-topic for this list, but doubtless someone will want to
show off their regex skills.
Just to convince us that you're not asking us to do your homework for
you, what have you tried so far, wit what results?
Tony van der Hoff | mailto:firstname.lastname@example.org
Buckinghamshire, England |