Replacing ereg_replace() with preg_replace() in PHP for Regex Handling

As PHP has evolved, so have its methods for handling regular expressions. One of the significant changes in recent years is