I have done my google research. I’ve tried preg_match, strsub_replace, almost everything.
I honestly can’t seem to figure out how to grab a word that is connected to a character.
I have a statuses system on my website. I am trying to figure out how replace a word with something else if it has the character ‘@’ in it.. like on twitter, when you say ‘@person’.
Any help is very much appreciated.
to just print matches:
to replace them:
will replace
@textwith-->text<--, as an example.