I tried the example in JMeter and works on my side. This is part of the
Debug sampler:

  Geboorteplaats=Avignon
  Geboorteplaats_g=1
  Geboorteplaats_g0=<dt>Geboorteplaats</dt>
        <dd>Avignon</dd>
  Geboorteplaats_g1=Avignon

Please make sure you don't have something like a trailing space in your
regular expression (because that would result in a default value). 

Nermin



-----Original Message-----
From: SanderW [mailto:san...@performancearchitecten.nl] 
Sent: 7. septembar 2011 10:40
To: jmeter-user@jakarta.apache.org
Subject: Regular Expression Extractor behaving different from Results Tree
RegEx Tester?

Hi All,

The regular expression I'm using in the Regular Expression Extractor keeps
getting the default value and I don't have a clue why it does that because
when I do a search on the same regular expression in the Results Tree
listener it comes back with the row I'm looking for.

First part the source code of the page:
/        <dt>Naam</dt>
        <dd>
            Brigitte  Moulin
        </dd>
        <dt>Geboortedatum</dt>
        <dd>13-12-1923</dd>
        <dt>Geboorteplaats</dt>
        <dd>Avignon</dd>
        <dt>Geboorteland</dt>
        <dd></dd>
        <dt>BSN</dt>/

Regular Expression Extractor values:
Apply to: Main sample only
Response field to check: Both 'body' and 'Body(unescaped)' are tried
Ref Name: Geboorteplaats
Regular Expression: <dt>Geboorteplaats</dt>\n.*<dd>(.+?)</dd>
Template: $1$
Match No: 1
Default value: Geboorteplaats not found!

The regular expression is working in the View Results Tree Response Data
search.
For the regular expression I tested with both with and without the newline
(\n). Without the \n the RegEx does not find anything.
I've tried adding (?m) or (?s) at the beginning of the RegEx.

The site http://regexhero.net/tester/ tells me my RegEx is correct.

Anybody have a clue why the variable Geboorteplaats keeps getting the
default value??


--
View this message in context:
http://jmeter.512774.n5.nabble.com/Regular-Expression-Extractor-behaving-dif
ferent-from-Results-Tree-RegEx-Tester-tp4777775p4777775.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org

Reply via email to