Re: Find Replace hyperlinks in a string

2007-11-27 Thread MonkeeSage
On Nov 27, 1:37 am, Nico Grubert [EMAIL PROTECTED] wrote: Hi there, I have a string containing some hyperlinks. I'd like to replace every hyperlink with a HTML style link. Example: Replace 'http://www.foo.com/any_url' with 'a

Re: Find Replace hyperlinks in a string

2007-11-27 Thread gsal
You mean in Python? 'cause if it is a one time shot kind of thing, I would simply open the file in my favorite editor (NEdit) and use a Search and Replace, check the regexp box and type my expression...something along the lines of ([^:]+)://([^:/]+)(: ([0-9]+))?(/.*) to find URLs and then replace

Find Replace hyperlinks in a string

2007-11-26 Thread Nico Grubert
Hi there, I have a string containing some hyperlinks. I'd like to replace every hyperlink with a HTML style link. Example: Replace 'http://www.foo.com/any_url' with 'a href=http://www.foo.com/any_url;http://www.foo.com/any_url/a' What's the best way to do this if I have a few