import re txt ='''1. @aut1.or@Autowired2. @Override@param@SuppressWarnings''' x = re.findall(r"^\s*(\d+\..*(?:\n@.*)+)", txt, re.M)print(x)
Standard input is empty
['1. @aut1.or\n@Autowired', '2. @Override\n@param\n@SuppressWarnings']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!