After the arrow, zero or more spaces, single or double quotation marks, any character to single or double quotation marks:
host['"]\s*\=>\s*['"](.*?)['"]
After comments. If you want to connect the file and get the result from it:
$array = require('path/to/.settings.php'); $array['connections']['value']['default']['host']; $array['connections']['value']['default']['login']; $array['connections']['value']['default']['password'];
If inside a bitrix, something like this:
use Bitrix\Main\Config as Conf; $configuration = Conf\Configuration::getInstance(); $array = $configuration->get('connections'); $array['default']['host']; $array['default']['login']; $array['default']['password'];