Hi Felix,
After study the link you gave and this link:
http://jakarta.apache.org/jmeter/usermanual/regular_expressions.html
I finally figure out my RegEx should be: .*"clientId":"([^"]+)".*
Then in my next Http request, I use ${CLIENTID_g1}. Everything works!
Thanks for your help!
Tao

> Date: Fri, 4 Feb 2011 10:23:20 +0100
> From: f...@mpexnet.de
> To: jmeter-user@jakarta.apache.org
> Subject: Re: How to use Regex Extractor Post Processor  to passing data from 
> the http response to another http request
> 
> Hi,
> 
> have you read this?
> 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
> 
> On 02/04/2011 10:13 AM, Tao Lin wrote:
> > 
> > Hi, 
> > I try to use JMeter to stress test a Comet server. I use a Http Post 
> > Request to send a handshake request to the server. The server return json 
> > data like this:
> > [{"channel":"/meta/handshake","id":"1","clientId":"iO2N3oUBScLMaXDThRZh","version":"1.0","supportedConnectionTypes":["long-polling"],"advice":{"reconnect":"retry"},"successful":true}]
> > Then I try to use Regex Extractor Post Processor to extract the clientId 
> > value "iO2N3oUBScLMaXDThRZh" from the response and put it into the second 
> > http post request which the post data should looks like this:
> > [{"channel":"/meta/connect", "connectionType":"long-polling", "id":2, 
> > "clientId":"iO2N3oUBScLMaXDThRZh"}]
> > But I don't know how to use the Regex Extractor Post Processor and passing 
> > data from the response to another request
> > Thanks,
> > Tao                                           
> 
> ---------------------------------------------------------------------
> 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