Limit number of preg_replace to 1 in configuration handlers