I have a string -
$file_data = This is a sample text. This text will be used as a dummy text for various RegEx operations using PHP.
I want to replace every 4 letter word with *
The Regex I'm using is
preg_replace("/\w{4}/", "*", $file_data)
But this also replaces words with length >=4. I want it to be strictly 4. How should I do it?