if (/my background error (\d+): (.+)/ ) { do something with the matched line }