I have this code which works how I want it but im not sure what is happening.
Can someone explain what is happening which each character.
Changing different parts of the expression to a different colour will also help.

PHP Code:
preg_replace('/(?!^.?).(?!.{0}$)/''*'$word_found); 
Say the word is 'replace'
It results in this:
r*****e

Thanks in advance.