You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Rsekhar <ra...@secf.com> on 2007/01/14 16:00:40 UTC

Regular expression extractor

Hi, 
 I just like to know how to use regular expression 
to extract only value from the below string
i want to extract
("SP#AQ:218[HNL:KOA][01/27/2007:750][01/27/2007:793][0:SP:SP:Coach]")

 <input type="radio" name="searchResults[0].selectedTripGroup"
value="SP#AQ:218[HNL:KOA][01/27/2007:750][01/27/2007:793][0:SP:SP:Coach]"
onclick="updateSelection('SearchFlightForm',this, 0 );">  5000 Miles</td>

Raja
-- 
View this message in context: http://www.nabble.com/Regular-expression-extractor-tf3006616.html#a8355987
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: Regular expression extractor

Posted by Rsekhar <ra...@secf.com>.
Thanks for replay,
it's not working.
Let me explain my script so that you will get the clear idea what I’m trying
to do, 
Main Thread Group
 1. Http Request (Login)
 2. Http Request (Search) in response we get multiple flight number 
 Regular Expression Extractor:
Reference Name: Test
Regular Expression: value=(SP#AQ:.*])
Template: $0$
Match no: 0
Ex:<input type="radio" name="searchResults[0].selectedTripGroup"
value="SP#AQ:82[HNL:KOA][01/27/2007:310][01/27/2007:353][0:SP:SP:Coach]"
checked="checked" onclick="updateSelection('SearchFlightForm',this, 0 );"> 
5000 Miles</td>
Ex 2 <input type="radio" name="searchResults[0].selectedTripGroup"
value="HP#AQ:82[HNL:KOA][01/27/2007:310][01/27/2007:353][0:HP:HP:Coach]"
onclick="updateSelection('SearchFlightForm',this, 0 );">  10000 Miles</td>
3. ForEach Controller
Input Variable Prefix: test
Output Variable Prefix: value
Http request: setting: searchResults%5B0%5D.selectedTripGroup: value :${
value}






Jens Voß wrote:
> 
> Rsekhar wrote:
> 
> 
>>Hi, 
>> I just like to know how to use regular expression 
>>to extract only value from the below string
>>i want to extract
>>("SP#AQ:218[HNL:KOA][01/27/2007:750][01/27/2007:793][0:SP:SP:Coach]")
>>
>> <input type="radio" name="searchResults[0].selectedTripGroup"
>>value="SP#AQ:218[HNL:KOA][01/27/2007:750][01/27/2007:793][0:SP:SP:Coach]"
>>onclick="updateSelection('SearchFlightForm',this, 0 );">  5000 Miles</td>
>>
>>Raja
>>  
>>
> Why don't you use an XPath extractor instead? The XPath expression would 
> be something like
> 
> //input[@name='searchResults[0].selectedTripGroup']/@value
> 
> Regards,
> Jens
> 
> ---------------------------------------------------------------------
> 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/Regular-expression-extractor-tf3006616.html#a8367073
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: Regular expression extractor

Posted by Jens Voß <je...@voss-ahrensburg.de>.
Rsekhar wrote:

>Hi, 
> I just like to know how to use regular expression 
>to extract only value from the below string
>i want to extract
>("SP#AQ:218[HNL:KOA][01/27/2007:750][01/27/2007:793][0:SP:SP:Coach]")
>
> <input type="radio" name="searchResults[0].selectedTripGroup"
>value="SP#AQ:218[HNL:KOA][01/27/2007:750][01/27/2007:793][0:SP:SP:Coach]"
>onclick="updateSelection('SearchFlightForm',this, 0 );">  5000 Miles</td>
>
>Raja
>  
>
Why don't you use an XPath extractor instead? The XPath expression would 
be something like

//input[@name='searchResults[0].selectedTripGroup']/@value

Regards,
Jens

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