import rep = re.compile(r'[^\W_]+')test_str = "feature.append(freq_and_feature(text, freq))" print(re.findall(p, test_str))
Standard input is empty
['feature', 'append', 'freq', 'and', 'feature', 'text', 'freq']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!