convert to preg_replace

I am new to PHP, ereg_replace is deprecated so need to convert ereg_replace to preg_replace, I can’t figure out how to put “delimiters and escape character” on $TEST_FILE below, can someone help me on this.

function KernelBase(){

            return trim(ereg_replace($TEST_FILE,NULL,$TEST))."fdKernel/";   

ereg_replace ( string $pattern , string $replacement , string $string )

preg_replace ( string $pattern, string $replacement, string $string )

See the commonality?

Sponsor our Newsletter | Privacy Policy | Terms of Service