def regexp_extraction(string, _regexp, groups=1):
 regexp_search = re.search(string=str(string), pattern=str(_regexp))
 if regexp_search:
  if (regexp_search.group(groups) != ''):
   return str(regexp_search.group(groups))
 return None

def regexp_extraction ( string , _regexp , groups = 1 ) : regexp_search = re . search ( string = str ( string ) , pattern = str ( _regexp ) ) if regexp_search : if ( regexp_search . group ( groups ) != '' ) : return str ( regexp_search . group ( groups ) ) return None
returns the capture group specified in the regexp .