You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by girishb <g_...@yahoo.com> on 2006/09/23 10:05:43 UTC

Regular expression

Hi,
I just like to know how to use regular expression to extract value of
"AccountId" from following href:

/abc/test/test.jsp?AccountId=fc8f1cef-4a53-11db-accc-57a710334549
test_USER0000

 
Also how to use regular expersion to extract opttion value from following
"<select> ... </select>" text:

<select name="tempIDs" multiple="multiple" size="8 class="formList"><option
value="ca17bac6-4a60-11db-accc-57a710334549"
selected="selected">TestOne</option></select>
 
 Thanks in advance.
 
Girish R. Bhujbal
-- 
View this message in context: http://www.nabble.com/Regular-expression-tf2321843.html#a6459748
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

Posted by sebb <se...@gmail.com>.
Try

AccountId=(.+?)"


On 23/09/06, Girish Bhujbal <g_...@yahoo.com> wrote:
> Hi Ravi,
>
> Thanks for reply. But its not working.
> Actual text is as follows (from where i have to
> extract value)
> <a
> href="/test/secured/test.jsp?AccountId=fc8f1cef-4a53-11db-accc-57a710334549">
>
> Girishb
>
> --- Ravi Kiran <ra...@bnaindia.com> wrote:
>
> > hey girishb,
> >
> >               use this
> > AccountId="([^"]+)"  this extracts all the values
> > that is contained in the
> > quotes matches even repetitions..
> > else
> > AccountId="(.+?) if only one possible match is there
> > i.e if its like this AccountId="007801561789"
> > then the value u will extract is 007801561789
> >
> > hope this will help
> > kiran
> >
> > ----- Original Message -----
> > From: "girishb" <g_...@yahoo.com>
> > To: <jm...@jakarta.apache.org>
> > Sent: Saturday, September 23, 2006 1:05 AM
> > Subject: Regular expression
> >
> >
> > >
> > > Hi,
> > > I just like to know how to use regular expression
> > to extract value of
> > > "AccountId" from following href:
> > >
> > >
> >
> /abc/test/test.jsp?AccountId=fc8f1cef-4a53-11db-accc-57a710334549
> > > test_USER0000
> > >
> > >
> > > Also how to use regular expersion to extract
> > opttion value from following
> > > "<select> ... </select>" text:
> > >
> > > <select name="tempIDs" multiple="multiple" size="8
> >
> > > class="formList"><option
> > > value="ca17bac6-4a60-11db-accc-57a710334549"
> > > selected="selected">TestOne</option></select>
> > >
> > > Thanks in advance.
> > >
> > > Girish R. Bhujbal
> > > --
> > > View this message in context:
> > >
> >
> http://www.nabble.com/Regular-expression-tf2321843.html#a6459748
> > > 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
> > >
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > jmeter-user-help@jakarta.apache.org
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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


Re: Regular expression

Posted by Girish Bhujbal <g_...@yahoo.com>.
Hi Ravi,

Thanks for reply. But its not working.
Actual text is as follows (from where i have to
extract value)
<a
href="/test/secured/test.jsp?AccountId=fc8f1cef-4a53-11db-accc-57a710334549">

Girishb

--- Ravi Kiran <ra...@bnaindia.com> wrote:

> hey girishb,
> 
>               use this
> AccountId="([^"]+)"  this extracts all the values
> that is contained in the 
> quotes matches even repetitions..
> else
> AccountId="(.+?) if only one possible match is there
> i.e if its like this AccountId="007801561789"
> then the value u will extract is 007801561789
> 
> hope this will help
> kiran
> 
> ----- Original Message ----- 
> From: "girishb" <g_...@yahoo.com>
> To: <jm...@jakarta.apache.org>
> Sent: Saturday, September 23, 2006 1:05 AM
> Subject: Regular expression
> 
> 
> >
> > Hi,
> > I just like to know how to use regular expression
> to extract value of
> > "AccountId" from following href:
> >
> >
>
/abc/test/test.jsp?AccountId=fc8f1cef-4a53-11db-accc-57a710334549
> > test_USER0000
> >
> >
> > Also how to use regular expersion to extract
> opttion value from following
> > "<select> ... </select>" text:
> >
> > <select name="tempIDs" multiple="multiple" size="8
> 
> > class="formList"><option
> > value="ca17bac6-4a60-11db-accc-57a710334549"
> > selected="selected">TestOne</option></select>
> >
> > Thanks in advance.
> >
> > Girish R. Bhujbal
> > -- 
> > View this message in context: 
> >
>
http://www.nabble.com/Regular-expression-tf2321843.html#a6459748
> > 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
> >
> > 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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

Posted by Ravi Kiran <ra...@bnaindia.com>.
hey girishb,

              use this
AccountId="([^"]+)"  this extracts all the values that is contained in the 
quotes matches even repetitions..
else
AccountId="(.+?) if only one possible match is there
i.e if its like this AccountId="007801561789"
then the value u will extract is 007801561789

hope this will help
kiran

----- Original Message ----- 
From: "girishb" <g_...@yahoo.com>
To: <jm...@jakarta.apache.org>
Sent: Saturday, September 23, 2006 1:05 AM
Subject: Regular expression


>
> Hi,
> I just like to know how to use regular expression to extract value of
> "AccountId" from following href:
>
> /abc/test/test.jsp?AccountId=fc8f1cef-4a53-11db-accc-57a710334549
> test_USER0000
>
>
> Also how to use regular expersion to extract opttion value from following
> "<select> ... </select>" text:
>
> <select name="tempIDs" multiple="multiple" size="8 
> class="formList"><option
> value="ca17bac6-4a60-11db-accc-57a710334549"
> selected="selected">TestOne</option></select>
>
> Thanks in advance.
>
> Girish R. Bhujbal
> -- 
> View this message in context: 
> http://www.nabble.com/Regular-expression-tf2321843.html#a6459748
> 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
>
> 


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