Python Regex punctuation recognition
问题 I am stumped by this one. I am just learning regular expressions and cannot figure out why this will not return punctuation marks. here is a piece of the text file the regex is parsing: APRIL/NNP is/VBZ the/DT cruellest/JJ month/NN ,/, breeding/VBG Lilacs/NNP out/RB of/IN the/DT dead/JJ land/NN text = open_file.read() grammarList = raw_input("Enter your grammar string: "); tags = grammarList.split("^") tags_pattern = r'\s+'.join(r"([\w\,\:\;\"\-\.]+)/{0}".format(re.escape(tag)) for tag in