def do_replace_regions(self, arg):
        el = self.options.entity_limit
        de = self.options.delete_entities
        if self.current and self.current.scanned:
            if len(arg.split()) == 0:
                print("Possible arguments are: {0}".format(self.possible_region_args_text))
            elif len(arg.split()) > 1:
                print("Error: too many parameters.")
            else:
                if arg in list(c.REGION_PROBLEMS_ARGS.values()) or arg == 'all':
                    for problem, status_text, a in c.REGION_PROBLEMS_ITERATOR:
                        if arg == 'all' or arg == a:
                            n = self.current.replace_problematic_regions(self.backup_worlds, problem, el, de)
                            if n:
                                self.current.scanned = False
                            print("\nReplaced {0} regions with status \'{1}\'.".format(n, status_text))
                else:
                    print("Unknown argument.")
        else:
            print("The world hasn't be scanned (or it needs a rescan). Use \'scan\' to scan it.")