Hi Again,
I have a JSOn response as
var RecaptchaState = {
site : '6LciS7oSAAAAAG8P5umXg9j_65IsvR1lboEYaqJ-',
challenge :
'03AHJ_VusWGO5_rL3ad5mK_dHhDPvCwmqZ56hSjSADoWFvTlucNbOChro_G6FluObzthCiQvZx6o3BgT2GKY-nBFbPJZM2kzIX-_G4jz4igbQPoDc7A8uxwqQi4ncg6f06QRk8pRFC0LCWHSfpGVHBaCSYTipZxHs78w',
is_incorrect : false,
programming_error : '',
error_message : '',
server : 'https://www.google.com/recaptcha/api/',
timeout : 18000
};
i am using a reg exp as "challenge":"(.+?)"
I am seeing no results ..
How is this different ??
-Shaba
On Fri, Nov 25, 2011 at 11:04 AM, Shaba K <[email protected]> wrote:
> I was passing as ${EXTRACTED_VALUES_g_2}
>
> Cheers,
> Shaba
>
>
>
>
>
>
>
> On Fri, Nov 25, 2011 at 10:41 AM, Nermin CALUK <[email protected]>wrote:
>
>> So your regex extractor setup will look like this:
>>
>> Reference Name: EXTRACTEDVALUES
>> Regular Expression: "params":"(.+?)nonce=(.+?)&psig=(.+?)"
>> Template: $1$$2$$3$
>> Match No: 1
>> Default Value: REGEX_FAILED
>>
>> Then your debug sampler will show:
>>
>> ...
>> EXTRACTEDVALUES_g2=T3LOmVN6YMl4KZGTJTyOJholMQ0
>> EXTRACTEDVALUES_g3=MnJNx0_iWJfADsh7C5-IbwCLfZM
>> ...
>>
>> Therefore you will use the following variables in next step:
>>
>> ${EXTRACTEDVALUES_g2}
>> ${EXTRACTEDVALUES_g3}
>>
>>
>> Cheers
>> Nermin
>>
>>
>> -----Original Message-----
>> From: Shaba K [mailto:[email protected]]
>> Sent: Friday, November 25, 2011 11:36 AM
>> To: JMeter Users List
>> Subject: Re: Extracting from JSON using Regular expression Extrator
>>
>> Thanks Nermin,
>>
>> Now got my head around how to pass
>>
>> This returns
>>
>> Match count: 1
>>
>> Match[1][0]="params":"authp=nonce.style&style=mock&nonce=J6p_d26Ou_gDxxeOECH
>> VwGZu3So&psig=9J0njCeWnb1z9JC-LVHDJH5eMtM"
>> Match[1][1]=authp=nonce.style&style=mock&
>> Match[1][2]=J6p_d26Ou_gDxxeOECHVwGZu3So
>> Match[1][3]=9J0njCeWnb1z9JC-LVHDJH5eMtM
>>
>> I have to use the values retrived in Match[1][2] & Match[1][3] from this
>> response & pass as a request to another
>>
>> Am passing as
>>
>>
>> k=${PUBLIC_KEY}&ajax=1&cachestop=0.6243942725806035&authp=nonce.style&style=
>> mock&nonce=${PUBLIC_KEY_g_2}&psig=niY9QRuXgso7xsst2cgRtxvIW2w
>>
>>
>> All my attempts are failing !!!
>>
>> -Shaba
>> On Fri, Nov 25, 2011 at 10:27 AM, Nermin CALUK <[email protected]>
>> wrote:
>>
>> > Shaba,
>> >
>> > Try something like this "params":"(.+?)nonce=(.+?)&psig=(.+?)"
>> >
>> > Second group will extract value of nonce, third group will contain psig
>> >
>> > Use debug sampler and "regexpr tester" in view results tree for
>> debugging
>> >
>> > Nermin
>> >
>> > -----Original Message-----
>> > From: Shaba K [mailto:[email protected]]
>> > Sent: Friday, November 25, 2011 11:16 AM
>> > To: JMeter Users List
>> > Subject: Re: Extracting from JSON using Regular expression Extrator
>> >
>> > i see the value returned is REGEX_FAILED
>> >
>> > On Fri, Nov 25, 2011 at 10:08 AM, Shaba K <[email protected]> wrote:
>> >
>> > > Hi All,
>> > >
>> > > I am stuck with getting this extraction right
>> > >
>> > > here's my JSON snippet
>> > >
>> > > {
>> > > :
>> > >
>> >
>> >
>>
>> "params":"authp=nonce.style&style=mock&nonce=T3LOmVN6YMl4KZGTJTyOJholMQ0&psi
>> > g=MnJNx0_iWJfADsh7C5-IbwCLfZM",
>> > > : "type":"reCAPTCHA",
>> > > : "public_key":"6LciS7oSAAAAAG8P5umXg9j_65IsvR1lboEYaqJ-",
>> > > : "server":"https://www.google.com/recaptcha/api",
>> > > : "command":"create_captcha"
>> > > }
>> > >
>> > >
>> > > i need to extract value of nonce & psig
>> > >
>> > >
>> > > am passing
>> > >
>> > > nonce
>> > > "params":"(.+?)"
>> > > $1$
>> > > -1
>> > > REGEX_FAILED
>> > >
>> > > Am bit of no vice on Reg extractor.
>> > >
>> > >
>> > >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [email protected]
>> > For additional commands, e-mail: [email protected]
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>