Hello, I found that JMeter's oro regex is somehow different from java's.
Now I need to iterate on different <tr> that matches a pattern, then: capture all the <td> elements within each <tr> , and select the 8th and 9th <td>. Since many <tr> elements appears in the HTML response, in order to do this I have to capture <tr> line by line without including two lines in a same group: so I should avoid capturing continuous <tr>..</tr><tr>..</tr> into the same group. By writing (?is)<tr\sclass="tgDataLine.*1\)\" >(.*)</tr> I will capture only one group that contains many real <tr> elements. So what should I write in the regex? Thanks. rosiere wrote: > > Thanks, > > In fact I'm facing difficulty with regular expressions and their > application in JMeter. > > I would like to capture the 8th and 9th columns (TD) from this HTML: > what expression should I write? > > > <TR class="tgDataLine1" onMouseOver="setOverColor(this, 'tgDataLine1', > 'loginForm', true,'tabGenCheckBox_EXTRANET_DEMANDE_ID',1)" > onMouseOut="setOverColor(this, 'tgDataLine1', 'loginForm', > false,'tabGenCheckBox_EXTRANET_DEMANDE_ID',1)" ><TD class="tgDataColumn" > style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">14/11/2009</TD> > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">R0219970 </TD> > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">LECLERC > ET VILLEDIEU</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">345160774</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">PHOTOCOPIEUR</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">13600.00</TD> > > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">60</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">T</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">ACCORD</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">13/11/2009</TD> > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0&alternativeForward=recapitulatifDemandeDocument'"> > images/unNonLu.gif </TD> > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'"> > images/cb_ko.JPG </TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">Location</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=0'">MME > LEROUX FABIENNE</TD> > </TR> > <TR class="tgDataLine2" onMouseOver="setOverColor(this, 'tgDataLine2', > 'loginForm', true,'tabGenCheckBox_EXTRANET_DEMANDE_ID',2)" > onMouseOut="setOverColor(this, 'tgDataLine2', 'loginForm', > false,'tabGenCheckBox_EXTRANET_DEMANDE_ID',2)" ><TD class="tgDataColumn" > style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">14/11/2009</TD> > > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">R0219945 </TD> > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">AGROSTAR</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">313609133</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">PHOTOCOPIEUR</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">20000.00</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">54</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">T</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">ACCORD</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">13/11/2009</TD> > > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1&alternativeForward=recapitulatifDemandeDocument'"> > images/unNonLu.gif </TD> > <TD class=tgDataColumn NoWrap align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'"> > images/cb_ko.JPG </TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'">Location</TD> > <TD class="tgDataColumn" style="white-space: nowrap;" align="center" > onClick="document.location='/ExtranetEuro/navigation.do?useSession=true&index=1'"></TD> > </TR> > > > > > > > rosiere wrote: >> >> Hello, >> >> I need to use JMeter to extract somes specifics lines (say, a line that >> contains: <td>313609133</td>), then , some specific columns' data on >> these line, (say, the 8th and 9th columns), just like the data >> surrounded by a red line, in attached image: >> >> and at last, store these data into a database. >> >> What iteration controllers and regular expressions should I use to >> extract them, and how can I use them? and what should I use to store >> these data into a database? >> >> Thanks. http://old.nabble.com/file/p26371440/table.GIF table.GIF >> >> >> >> >> >> >> > > -- View this message in context: http://old.nabble.com/How-can-I-extract-cell-data-%28content-surrounded-by-%3Ctd%3E%3C-td%3E%29-from-a-%3Ctable%3E-in-HTML-response--tp26371440p26408429.html Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

