I've read few articles and posts but I couldn't find out a solution in removing a specific url from a text. I have tried at least 3 different expressions. It's good to know that I'm doing it programmatically (C#).
(?<!"")((www\.|(http|https|ftp|news|file)+\:\/\/)[_.a-z0-9-]+\.[a-z0-9\/_:@=.+?,##%&~-]*[^.|\'|\# |!|\(|?|,| |>|<|;|\)])(?!"")
((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)
(?<!\w?="")(((http|https|ftp|news|file)+://)[_.a-z0-9-]+\.[a-z0-9\/_:@=.+?,##%&~-]*[^.|\'|\# |!|\(|?|,| |>|<|;|\)])
The example url is below. Note that not all urls will be exactly like that. This is the worst one.
http://api.ning.com/files/tHduipNJAW29nIL5jzWbrYON5NhTKYVXmzollyMEHasDDvnq1454BrFkXFfmzj1gH7Ye3xw03C9ulNTICYAdueKg6vaIeu/PauloSkaf.png
Could someone guide me to the solution?
UPDATE
As hwnd mentioned the best pattern is
https?\S+


api.ning.com?