Use preg_replace_callback instead of \e to avoid an E_DEPRECATED on php-5.5alpha
Improve method matching in configurator