Regular Expression to find brackets in a string,"brackets = re.sub('[^(){}[\\]]', '', s)"