I have a program-generated HTML file, and this tag is repeating:
<table cellspacing="0" cellpadding="0" border="0" id="pt1:pt_region0:0:resId1:5:pgl3">
<table cellspacing="0" cellpadding="0" border="0" id="pt1:pt_region0:0:resId1:4:pgl3">
<table cellspacing="0" cellpadding="0" border="0" id="pt1:pt_region0:0:resId1:3:pgl3">
How do I get only the first number (5) with a regular expression and ignore other indexes?
Try, and this is assuming from your question (which is not quite clear) that you want to extract the actual index value from the tag: