$re = '/\"Data Flow Task:Error: There was an error with Insert Destination\.Inputs\[OLE DB Destination Input\]\.Columns\[(.*?)\] on Insert Destination\.Inputs\[OLE DB Destination Input\]\. The column status returned was\: "The value violated the integrity constraints for the column\."\./';
$str = '"Data Flow Task:Error: There was an error with Insert Destination.Inputs[OLE DB Destination Input].Columns[EmissionMarket] on Insert Destination.Inputs[OLE DB Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".';
preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 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