You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by zillakilla <zi...@sogetthis.com> on 2011/04/07 09:26:11 UTC

Re: problem with regular expression

Hi,
try this:
EntityId=([\d]*)[^>]*documentId=([\d]*)[^\[]*(.*?)Doc

It get all matches in 3 seperate groups!


Zilla

--
View this message in context: http://jmeter.512774.n5.nabble.com/problem-with-regular-expression-tp4287850p4287882.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: problem with regular expression

Posted by zillakilla <zi...@sogetthis.com>.
In order to get the LAST documentId... this is the way I would do it:
1st put regEx extractor [as a child of HTTP Sampler] with these settings to
check 'how many document IDs are returned':
Ref name = totalMatches
regEx = documentId=([\d]*)
Template = $1$
Match No. = -1
Default value = NOT_FOUND

immediately AFTER the the 1st regEx extractor add another regEx extractor
[so BOTH regEX extractors are children of HTTP sampler] with these settings:
Ref name = documentId
regEx = documentId=([\d]*)
Template = $1$
Match No. = ${totalMatches_matchNr}
Default value = NOT_FOUND


:)
Zilla

--
View this message in context: http://jmeter.512774.n5.nabble.com/problem-with-regular-expression-tp4287850p4295474.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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