PHP Twitter replace link and hashtag for real link

m339

New Member
I am looping over json response from Twitter api. Each api response gives me a tweet similar to:Hi my name is @john, and I love #soccer, visit meI am trying to replace @john, and insert \[code\]<a href=http://twitter.com/john>@john</a>\[/code\] but the comma (,) after @john, is the problem.How to replace dots, commas, etc before and after the tag?
 
Back
Top