You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Serpent_Guard <bl...@gmail.com> on 2008/12/17 19:05:50 UTC

Help with Regex Extractor

I need some help with the Post-Processor/Regex Extractor element.  I have
response data that contains this snippet:  '<input id="guid" name="guid"
value="000004.30000000000000204~Active~~2007TR080931" type="radio" />'.  I
need the extractor to grab '000004.30000000000000204' and put it in a
variable so I can use it later.

I set up my extractor like this:  Reference Name:  GUID_VARIABLE;  Regular
Expression:  <input id=\"guid\"\ name=\"guid value=\"(.*?)~Active~~; 
Template:  $1$;  Match No.:  1;  Default Value:  0.  I placed my extractor
as a child element of the HTTP Sampler.  When I run it, the default value of
0 is used.

I also tried stripping out all the back-slashes in the expression, in the
off-chance that it automatically places those.  No luck.

Anyone have any ideas as to what's going wrong?
-- 
View this message in context: http://www.nabble.com/Help-with-Regex-Extractor-tp21058269p21058269.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: Help with Regex Extractor

Posted by Serpent_Guard <bl...@gmail.com>.
Works like a charm.  Thanks for your speedy response.


Temoor A. Janjua wrote:
> 
> Try the regex :
> 
> <input id="guid" name="guid" value="(.*)~Active.*type="radio" />
> 
> Thanks,
> TJ
> 
> 
> Serpent_Guard wrote:
>> I need some help with the Post-Processor/Regex Extractor element.  I have
>> response data that contains this snippet:  '<input id="guid" name="guid"
>> value="000004.30000000000000204~Active~~2007TR080931" type="radio" />'. 
>> I
>> need the extractor to grab '000004.30000000000000204' and put it in a
>> variable so I can use it later.
>>
>> I set up my extractor like this:  Reference Name:  GUID_VARIABLE; 
>> Regular
>> Expression:  <input id=\"guid\"\ name=\"guid value=\"(.*?)~Active~~; 
>> Template:  $1$;  Match No.:  1;  Default Value:  0.  I placed my
>> extractor
>> as a child element of the HTTP Sampler.  When I run it, the default value
>> of
>> 0 is used.
>>
>> I also tried stripping out all the back-slashes in the expression, in the
>> off-chance that it automatically places those.  No luck.
>>
>> Anyone have any ideas as to what's going wrong?
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help-with-Regex-Extractor-tp21058269p21058930.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: Help with Regex Extractor

Posted by "Temoor A. Janjua" <tj...@unicon.net>.
Try the regex :

<input id="guid" name="guid" value="(.*)~Active.*type="radio" />

Thanks,
TJ


Serpent_Guard wrote:
> I need some help with the Post-Processor/Regex Extractor element.  I have
> response data that contains this snippet:  '<input id="guid" name="guid"
> value="000004.30000000000000204~Active~~2007TR080931" type="radio" />'.  I
> need the extractor to grab '000004.30000000000000204' and put it in a
> variable so I can use it later.
>
> I set up my extractor like this:  Reference Name:  GUID_VARIABLE;  Regular
> Expression:  <input id=\"guid\"\ name=\"guid value=\"(.*?)~Active~~; 
> Template:  $1$;  Match No.:  1;  Default Value:  0.  I placed my extractor
> as a child element of the HTTP Sampler.  When I run it, the default value of
> 0 is used.
>
> I also tried stripping out all the back-slashes in the expression, in the
> off-chance that it automatically places those.  No luck.
>
> Anyone have any ideas as to what's going wrong?
>   


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