def find_first_level_groups(string, enclosing, blank_sep=None):
 groups = find_first_level_groups_span(string, enclosing)
 if blank_sep:
  for (start, end) in groups:
   string = str_replace(string, start, blank_sep)
   string = str_replace(string, (end - 1), blank_sep)
 return split_on_groups(string, groups)

def find_first_level_groups ( string , enclosing , blank_sep = None ) : groups = find_first_level_groups_span ( string , enclosing ) if blank_sep : for ( start , end ) in groups : string = str_replace ( string , start , blank_sep ) string = str_replace ( string , ( end - 1 ) , blank_sep ) return split_on_groups ( string , groups )
return a list of groups that could be split because of explicit grouping .