'get the common fancy prefix (if any) from a list of locations
see get_fancy_prefix for the definition of a fancy prefix
:param view:
the current view
:param locations:
either a list of points or a list of sublime.Regions'

def get_common_fancy_prefix(self, view, locations):

    remove_regions = []
    old_prefix = None
    new_prefix = ''
    for location in locations:
        prefix_region = self.get_fancy_prefix(view, location)
        if prefix_region.empty():
            continue
        new_prefix = view.substr(getRegion((prefix_region.begin() + 1), prefix_region.end()))
        remove_regions.append(prefix_region)
        if (old_prefix is None):
            old_prefix = new_prefix
        elif (old_prefix != new_prefix):
            old_prefix = True
            new_prefix = ''
    return (new_prefix, remove_regions)
