Use re.search to search more than the first line...

(cherry picked from commit 2c47322167ea1d4cbbd91b55b669485612e602ec)