regex for loop over list in python
问题 I have this list [<th align="left"> <a href="blablabla">F</a>ojweousa</th>, <th align="left"> <a href="blablabla">S</a>awdefrgt</th>, ...] and want the one single character after "> the multiple characters between </a> and </th>, to be concatenated so that i can move on with my life. Here is my code item2 = [] for element in items2: first_letter = re.search('">.</a', str(items2)) second_letter = re.search(r'</a>[a-zA-Z0-9]</th>,', str(items2)) item2.append([str(first_letter) + str(second