radioperfect
New Member
I need to replace words that start with hash mark (#) inside a text.Well I know how I can replace whole words. \[code\]preg_replace("/\b".$variable."\b/", $value, $text);\[/code\]Because that \b modifier accepts only word characters so a word containing hash mark wont be replaced.I have this html which contains #companyName type of variables which I replace with a value.