def extractRegexResult(regex, content, flags=0):
 retVal = None
 if (regex and content and ('?P<result>' in regex)):
  match = re.search(regex, content, flags)
  if match:
   retVal = match.group('result')
 return retVal

def extractRegexResult ( regex , content , flags = 0 ) : retVal = None if ( regex and content and ( '?P<result>' in regex ) ) : match = re . search ( regex , content , flags ) if match : retVal = match . group ( 'result' ) return retVal
returns result group value from a possible match with regex on a given content .