#NEWLINE# def _first_group_match( text , patterns ) : #NEWLINE# #INDENT# if text : #NEWLINE# #INDENT# for pattern in patterns : #NEWLINE# #INDENT# match = re . search ( pattern , text ) #NEWLINE# if match : #NEWLINE# #INDENT# return match . groups ( ) [ 0 ]