The preg_replace() function is an inbuilt function in PHP which is used to perform a regular expression for search and replace the content.
Syntax:
preg_replace( $pattern, $replacement, $subject, $limit, $count )
Parameters: This function accepts five parameters as mention above and describe below.