Re: Extracting values from capturing groups in regex Programming Software Development by Tom_45 …;right"><td>165</td><td>Kristopher</td><td>Cristina</td> <tr…;right"><td>327</td><td>Zachariah</td><td>Shaniqua</td> <tr…;right"><td>710</td><td>Jefferson</td><td>Kimberlee</td> <tr… Extracting values from capturing groups in regex Programming Software Development by Tom_45 …;right"><td>237</td><td>Marvin</td><td>Pamela</td> <tr…;right"><td>238</td><td>Micah</td><td>Kristine</td> <tr…;right"><td>239</td><td>Collin</td><td>Raquel</td> I am… Extracting values from a regex match Programming Software Development by Tom_45 …;right"><td>237</td><td>Marvin</td><td>Pamela</td> <tr…;right"><td>238</td><td>Micah</td><td>Kristine</td> <tr…;right"><td>239</td><td>Collin</td><td>Raquel</td> I am… Re: Extracting values from capturing groups in regex Programming Software Development by AndreRet …;td>Collin</td><td>Raquel</td> ''' pattern = re.compile(r'<td.*?>(.*?)<\/td><td.*?>(.*?)<\/td…><td.*?>(.*?)<\/td>', re.DOTALL) matches = pattern… Re: Extracting values from capturing groups in regex Programming Software Development by Reverend Jim …;<td>236</td><td>Roy</td><td>Allyson</td>' pat = '<td>(.+?)</td>… Re: Extracting values from a regex match Programming Software Development by Reverend Jim …;<td>236</td><td>Roy</td><td>Allyson</td>' pat = '<td>(.+?)</td>… Re: Extracting values from capturing groups in regex Programming Software Development by Reverend Jim Try import re pat = '<td>(.+?)</td>' for line in open('yourfile.html'): if line.startswith('&…lt;tr align="right"><td>'): print(re.findall(pat,line)) I realized that findall… Re: Extracting values from a regex match Programming Software Development by Tom_45 Question has been answered. The correct pattern is: matches = re.findall(r'<td>(\d+)+<\/td><td>(\w+)<\/td><td>(\w+)', file) Why am getting different syntax errors when running a Python script Programming Software Development by Tom_45 …: matches = re.findall('<td>[0-9]+<\/td><td>(\w+)<\/td><td>(\w+)', file) for match… Re: Extracting values from capturing groups in regex Programming Software Development by Tom_45 I'm not getting the results you presented, I'm getting the whole file not just the tr tags. The tr tags I used was just a subset of the entire file. Re: Extracting values from capturing groups in regex Programming Software Development by Reverend Jim Just process the file line by line and apply the regular expression to particular lines. I can't give you an expression that matches only the lines you showed me with a guarantee that in matches nothing else without seeing the entire file. Re: Extracting values from capturing groups in regex Programming Software Development by Reverend Jim You can either read the entire file into a list, then filter that list, or you could process it line by line and process each matching line. For example (using my file) for line in open('usblog.txt'): if '2024-01-24' in line: print(line) or text = open('usblog.txt').readlines() for line in [x for x in text if… Re: Extracting values from a regex match Programming Software Development by pritaeas Sidenote: If you want to learn, understand and experiment with regexes I can highly recommend RegexBuddy. Re: Extracting values from a regex match Programming Software Development by Reverend Jim Also [autoregex](https://www.autoregex.xyz/) Re: Extracting values from a regex match Programming Software Development by AndreRet Same question, different post - [Extracting values from capturing groups in rege](https://www.daniweb.com/programming/software-development/threads/541420/extracting-values-from-capturing-groups-in-regex) Re: Extracting values from capturing groups in regex Programming Software Development by Tom_45 Issue resolved Re: Why am getting different syntax errors when running a Python script Programming Software Development by Tom_45 After I posted this question I noticed that I was missing the raw string indicator and the capture group enclosing parenthesis on the findall, which explains the subscripting error. So, hold off on the answers for now. I'm still having other issues with multiple file runs, though. Re: Why am getting different syntax errors when running a Python script Programming Software Development by Tom_45 Finished the assignment and was able to work out the bugs I was encountering. In addition to the issues I mentioned in my last reply, I had several instances of not indenting properly so that statements like exit() were not executing because their indention made them part of an if statement. Re: different <td> width Digital Media UI / UX Design by ztini td width is based on the widest cell in the column. So if row 1, column 1 is 50px wide and row 10, column 1 is 25px, the entire column will be 50px. Inserting all the values from two different tables in the form Programming Web Development by opawix … <tr align="center"> <td></td> <td bgcolor="#DDDDDD"><input type…;?php printf($row['sub_name']); ?>"></td> <td bgcolor="#DDDDDD"><input type="… resource #5 Programming Web Development by davy_yg …" value="2 box 1 pack"></td><br> <tr> <?php // use… date picker to automate date ?> <td>Tanggal :</td> <td><input type="date" id…" name="Tanggal" value=""></td><br> </tr> <?php if… checked checkbox Programming Web Development by jacob21 <td><input name="power" type="checkbox&… "checked"; ?> /></td> <td>Power Backup</td> <td style="width:25px;">…($row['water_purifier']=='on') echo "checked"; ?> /></td> I have some checkboxes ,what i am trying to… Argent please help Programming Web Development by Nirmeen Ased …} ?> </select> </td> </tr> <tr> <…gt;Teacher Number:</strong></td> <td width="217" align="right…title" checked="checked"/></td> <input type="submit" … want that if user dont update his pic dont change Programming Web Development by rjusman90 …quot;file" name="userfile" ></td> </tr> <tr class="tableheader…"> <td colspan="4" class="last"><…class="button" value="Update"/></td> </tr> </table> <… want to use checkbox if in my db the value is 1 the checkbox is click Programming Web Development by rjusman90 <td>FooterMenu</td> <td><input type="checkbox" name="FooterMenu" value="1" <?php if($FooterMenu == 1): ?> checked="checked" <?php elseif($FooterMenu != 1):?> checked="unchecked" <?php endif;?>/> </td> want to save image in folder Programming Web Development by rjusman90 …;Upload your pic</td> <td><input type="file" name="1234&…quot; value=""></td> <?php $img =$_POST['1234']; $sql="UPDATE users… php dropdownmenu Programming Web Development by sinyi <td> <select name="sourceitems"> <?php $…>"; $Qry1->next(); } ?> </select> </td> Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or… unexpected T_STRING Programming Web Development by furqankhyraj <td><a href="$_SERVER['PHP_SELF'] . '?id=' . $myrow["article_tittle"] ">'.$row["article_tittle"].'</a></td> what's the error in above code, its showing error Parse error: syntax error, unexpected T_STRING in ...../class.article.php on line 64 Please identify syntax error in if else Programming Web Development by noel9 <td><input type="text" name="c1" value=" <?php if($p_id!="")echo $a? else echo $p_name>" ></td> font - size Programming Web Development by davy_yg <td>DESCRIPTION<i><div class="font-family: arial; font-size: 6px;">description of a category</div></i></td>