Jump to content

Finding links adjusting spaces


dwayn

Recommended Posts

Hi all,

 

What am trying to do is to find links in a string and replace them. Situation is that the link need not be separated by spaces...

 

e.g.

 

Contrary to popular belief, http://example.com/xyz=pqr Lorem Ipsum is not simply random texthttp://example.com/xyzzzzz=pqrs.... It has roots in a piece of classical Latin literature from 45 BC, making http://example.com/xyz=pqrrrrrrrit over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, lookedhttp://example.com/xyz=pqr

 

should come like this(assuming replacement string is "Hello")

 

Contrary to popular belief, Hello Lorem Ipsum is not simply random text Hello. It has roots in a piece of classical Latin literature from 45 BC, making Hello it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked Hello

 

i.e with proper spaces in the output no matter whats in the output.... Any suggestions on how to do it?

Link to comment
https://forums.phpfreaks.com/topic/225522-finding-links-adjusting-spaces/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.