jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Regular expression
Date Thu, 16 Oct 2014 17:08:21 GMT
use negative lookahead- but I havent ever used it
http://www.regular-expressions.info/lookaround.html so ull have to test it
out

easier ways to do this are to
a. Use XPath (but this is slow )
b. Extract out all matches , capture both the teamusers element and
wanted/unwanted line in different groups . Write a post processor that
iterates through all results and excludes the ones you dont want , set the
new values into a variable - let me know if u need an example





On Thu, Oct 16, 2014 at 9:28 AM, Peter Peterse <peter@peterse-uithuizen.com>
wrote:

> Hello list,
>
> I have an output which contains the next lines:
> ========
> </script><span style="display: none"
> id="cell_1_teamtype_id">123</span><span style="display: none"
> id="cell_1_region_id">543</span></td><td style="color: black;"
> id="cell_1_3" class="table-even">ROT</td><td style="color: black;"
> id="cell_1_2" class="table-even">unwanted line</td><td style="color:
> black;" id="cell_1_4" class="table-even">lorum ipsum</td><td
> style="color: black;" id="cell_1_5" class="table-even">1</td><td
> style="color: black;" class="table-even" id="cell_1_6">some text</td><td
> style="color: black;" id="cell_1_7" class="table-even"><a title="Toon
> alle gebruikers in dit team"
> href="javascript:goto_teamUsers('t1');">Gebruikers</a></td>
> </script><span style="display: none"
> id="cell_2_teamtype_id">234</span><span style="display: none"
> id="cell_2_region_id">543</span></td><td style="color: black;"
> id="cell_2_3" class="table-odd">AcBRW</td><td style="color: black;"
> id="cell_2_2" class="table-odd">wanted line</td><td style="color:
> black;" id="cell_2_4" class="table-odd">ipsum</td><td style="color:
> black;" id="cell_2_5" class="table-odd">1</td><td style="color: black;"
> class="table-odd" id="cell_2_6">some text</td><td style="color: black;"
> id="cell_2_7" class="table-odd"><a title="Toon alle gebruikers in dit
> team" href="javascript:goto_teamUsers('t2');">Gebruikers</a></td>
> </script><span style="display: none"
> id="cell_3_teamtype_id">345</span><span style="display: none"
> id="cell_3_region_id">543</span></td><td style="color: black;"
> id="cell_3_3" class="table-even">MK</td><td style="color: black;"
> id="cell_3_2" class="table-even">wanted line</td><td style="color:
> black;" id="cell_3_4" class="table-even">lorum</td><td style="color:
> black;" id="cell_3_5" class="table-even">1</td><td style="color: black;"
> class="table-even" id="cell_3_6">some text</td><td style="color: black;"
> id="cell_3_7" class="table-even"><a title="Toon alle gebruikers in dit
> team" href="javascript:goto_teamUsers('t3');">Gebruikers</a></td>
> ========
>
> I want to extract id from teamUsers which will work with:
> teamUsers\('([^']*)'\)
> But I want to exclude the line which contains the text "unwanted line"
>
> Does someone knows how to solve this puzzle?
>
> Regards,
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message