$re = '/ENERGIA ELETRICA CONSUMO[^%]+%/m';
$str = 'ENERGIA ELETRICA CONSUMO%
02/2019 347 26/04/2019 305,09 ENERGIA CONS. B.AMARELA kWh 0,54 0,54 29,00% 01/2019 341 11/03/2019 324,39 12/2018 301 26/12/2018 287,83
ENERGIA ELETRICA CONSUMO abc %';
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