String: this is text :wall: :wall: :wall: :wall: more text
Output should be: this is text :wall: more text
Task: Reduce the word :wall: to only 1.
I tried these both ideas, but didn't work:
$post_message = preg_replace("/([\:wall:])+/", "\\1", $post_message);
$post_message = preg_replace('/:wall:/', '', $post_message, 1);