I want to get all my that’s inside .
I wrote this code:
matchObj = re.search(r'<tr>(.*?)</tr>', txt, re.M|re.I|re.S)
but I only get the first group.
how can I get all groups?
Thanks in advance 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
findallsearchonly finds the first one in the given string.you can read more about the different methods you can use in regex.
however, it looks like you are parsing HTML. why don’t you use an HTMl parser?