Parse text for hashtags and replace with links using php
问题 I have some text with twitter style #hashtags. How would I write a function to parse a body of text that might contain an unlimited number of #hashtags, take the text of the hashtag and replace them all with an <a href="tag/[hashtag text]">[hashtag text]</a> I've thought a lot about how to do this but I am really bad at writing these sorts of functions with regex. Example text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus #tristique non elit eu iaculis. Vivamus eget