def checkdirname(name):
	"check if directory name matches with the given pattern"
	
	pattern = re.compile(r'^arth(\D*)-d$')
	#print 'checking dirname:', name
	m = pattern.search(name)
	if m is None:
		return False
	else:
		#print 'returning true for', name
		return True
check if directory name matches with the given pattern
recipes/Python/435904_sedawk__Pythscript_rename_subdirectories/recipe-435904.py