$re = '/(?<=[,"])\b(?P<HostName>\w+)(?=,Default)/m';
$str = '"2018-12-12 13:25:30","Renju, Jacob,M(renjutest)","Renju, Jacob, M (rtest),Renju123,Default Site,Test/firewall","10.221.5.136","XXX.XXX.XXX.XXX","Allowed","16 (A)","NOERROR","1XX.1X.1XX.1XX.Test.com.","Computer Security"
"2018-12-12 13:09:55","rtest","Renju123,Default Site,Renju Renju/Renju","10.250.33.85","XXX.XXX.XXX.XXX","Allowed","12 (PTR)","NOERROR","1XX.1X.1XX.1XX.Test.com.","Software/Technology"
"2018-12-12 14:29:49","Default Site","Renju Test/Firewal,Default Site","10.250.33.8","1XX.1X.1XX.1XX.Test.com","Allowed","28 (AAAA)","NXDOMAIN","targets.","".
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php