You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by umesh prajapati <pr...@gmail.com> on 2013/07/03 18:53:43 UTC

Mulitple Reg Ex Extractor

Hi,

Can we use 2 Regular Expression Extractor under one HTTP Request Sampler?
The reason I am using 2 Regular Expression Extractor is because one Reg Ex
I am using to extract data from the response body and one Reg Ex Extractor
I am using to extract from request URL and save both the extracted data
into a file.

Re: Mulitple Reg Ex Extractor

Posted by sebb <se...@gmail.com>.
On 4 July 2013 12:17, Flavio Cysne <fl...@gmail.com> wrote:
> Had to escape slashes to got it working.
>
> customer\/(.+?)\/services

I don't understand why that has any effect - slashes are not
meta-characters, they stand for themselves.

> Tested using Firefox plug-in Regular Expression Tester

What RE engine does that use?

There's a RE tester in the Tree View Listener which uses the same RE
engine as the rest of JMeter.

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


Re: Mulitple Reg Ex Extractor

Posted by Flavio Cysne <fl...@gmail.com>.
Had to escape slashes to got it working.

customer\/(.+?)\/services

Tested using Firefox plug-in Regular Expression Tester

Re: Mulitple Reg Ex Extractor

Posted by umesh prajapati <pr...@gmail.com>.
got it working....now it was my pattern that was giving null


On Wed, Jul 3, 2013 at 11:25 AM, hame <ha...@gmail.com> wrote:

> did you try  without "*"??
>
>
> On Wed, Jul 3, 2013 at 11:21 AM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > I tried with out quote too and on my logg it is giving me
> >  ERROR - jmeter.extractor.RegexExtractor: Error in pattern:
> > *teacher/(.+?)/classes
> >
> > so which is definitely the Regex Expression is not right ...but I dont
> know
> > why its not right
> >
> >
> > On Wed, Jul 3, 2013 at 11:08 AM, hame <ha...@gmail.com> wrote:
> >
> > > Try to enable the JMeter logging and see what's going on. I am not sure
> > but
> > > there shouldn't be any double quote in regular expression because your
> > URL
> > > doesn't have that. Try to debug your Regular expression first. take one
> > > step at a time and check the result.
> > >
> > >
> > > On Wed, Jul 3, 2013 at 10:47 AM, umesh prajapati <praumesh86@gmail.com
> > > >wrote:
> > >
> > > > the Reg Ex that i am using to extract from body is working fine but
> the
> > > Reg
> > > > Ex I am using to extract from url is giving me null value.
> > > >
> > > >
> > > >
> > >
> >
> https://integratons.progressive.com/pgs/customer/ffsdfe3235sdfsdg32wg/services?includeDeleted=false
> > > >
> > > > I am trying to extract ffsdfe3235sdfsdg32wg from the above URL
> > > >
> > > > My Reg Ex expression is *customer/"(.+?)"/services
> > > >
> > > >
> > > > On Wed, Jul 3, 2013 at 9:58 AM, hame <ha...@gmail.com> wrote:
> > > >
> > > > > Yes you can use two RegEx extractor on one HTTP Request.
> > > > >
> > > > >
> > > > > On Wed, Jul 3, 2013 at 9:53 AM, umesh prajapati <
> > praumesh86@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Can we use 2 Regular Expression Extractor under one HTTP Request
> > > > Sampler?
> > > > > > The reason I am using 2 Regular Expression Extractor is because
> one
> > > Reg
> > > > > Ex
> > > > > > I am using to extract data from the response body and one Reg Ex
> > > > > Extractor
> > > > > > I am using to extract from request URL and save both the
> extracted
> > > data
> > > > > > into a file.
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Mulitple Reg Ex Extractor

Posted by hame <ha...@gmail.com>.
did you try  without "*"??


On Wed, Jul 3, 2013 at 11:21 AM, umesh prajapati <pr...@gmail.com>wrote:

> I tried with out quote too and on my logg it is giving me
>  ERROR - jmeter.extractor.RegexExtractor: Error in pattern:
> *teacher/(.+?)/classes
>
> so which is definitely the Regex Expression is not right ...but I dont know
> why its not right
>
>
> On Wed, Jul 3, 2013 at 11:08 AM, hame <ha...@gmail.com> wrote:
>
> > Try to enable the JMeter logging and see what's going on. I am not sure
> but
> > there shouldn't be any double quote in regular expression because your
> URL
> > doesn't have that. Try to debug your Regular expression first. take one
> > step at a time and check the result.
> >
> >
> > On Wed, Jul 3, 2013 at 10:47 AM, umesh prajapati <praumesh86@gmail.com
> > >wrote:
> >
> > > the Reg Ex that i am using to extract from body is working fine but the
> > Reg
> > > Ex I am using to extract from url is giving me null value.
> > >
> > >
> > >
> >
> https://integratons.progressive.com/pgs/customer/ffsdfe3235sdfsdg32wg/services?includeDeleted=false
> > >
> > > I am trying to extract ffsdfe3235sdfsdg32wg from the above URL
> > >
> > > My Reg Ex expression is *customer/"(.+?)"/services
> > >
> > >
> > > On Wed, Jul 3, 2013 at 9:58 AM, hame <ha...@gmail.com> wrote:
> > >
> > > > Yes you can use two RegEx extractor on one HTTP Request.
> > > >
> > > >
> > > > On Wed, Jul 3, 2013 at 9:53 AM, umesh prajapati <
> praumesh86@gmail.com
> > > > >wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Can we use 2 Regular Expression Extractor under one HTTP Request
> > > Sampler?
> > > > > The reason I am using 2 Regular Expression Extractor is because one
> > Reg
> > > > Ex
> > > > > I am using to extract data from the response body and one Reg Ex
> > > > Extractor
> > > > > I am using to extract from request URL and save both the extracted
> > data
> > > > > into a file.
> > > > >
> > > >
> > >
> >
>

Re: Mulitple Reg Ex Extractor

Posted by umesh prajapati <pr...@gmail.com>.
I tried with out quote too and on my logg it is giving me
 ERROR - jmeter.extractor.RegexExtractor: Error in pattern:
*teacher/(.+?)/classes

so which is definitely the Regex Expression is not right ...but I dont know
why its not right


On Wed, Jul 3, 2013 at 11:08 AM, hame <ha...@gmail.com> wrote:

> Try to enable the JMeter logging and see what's going on. I am not sure but
> there shouldn't be any double quote in regular expression because your URL
> doesn't have that. Try to debug your Regular expression first. take one
> step at a time and check the result.
>
>
> On Wed, Jul 3, 2013 at 10:47 AM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > the Reg Ex that i am using to extract from body is working fine but the
> Reg
> > Ex I am using to extract from url is giving me null value.
> >
> >
> >
> https://integratons.progressive.com/pgs/customer/ffsdfe3235sdfsdg32wg/services?includeDeleted=false
> >
> > I am trying to extract ffsdfe3235sdfsdg32wg from the above URL
> >
> > My Reg Ex expression is *customer/"(.+?)"/services
> >
> >
> > On Wed, Jul 3, 2013 at 9:58 AM, hame <ha...@gmail.com> wrote:
> >
> > > Yes you can use two RegEx extractor on one HTTP Request.
> > >
> > >
> > > On Wed, Jul 3, 2013 at 9:53 AM, umesh prajapati <praumesh86@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > Can we use 2 Regular Expression Extractor under one HTTP Request
> > Sampler?
> > > > The reason I am using 2 Regular Expression Extractor is because one
> Reg
> > > Ex
> > > > I am using to extract data from the response body and one Reg Ex
> > > Extractor
> > > > I am using to extract from request URL and save both the extracted
> data
> > > > into a file.
> > > >
> > >
> >
>

Re: Mulitple Reg Ex Extractor

Posted by hame <ha...@gmail.com>.
Try to enable the JMeter logging and see what's going on. I am not sure but
there shouldn't be any double quote in regular expression because your URL
doesn't have that. Try to debug your Regular expression first. take one
step at a time and check the result.


On Wed, Jul 3, 2013 at 10:47 AM, umesh prajapati <pr...@gmail.com>wrote:

> the Reg Ex that i am using to extract from body is working fine but the Reg
> Ex I am using to extract from url is giving me null value.
>
>
> https://integratons.progressive.com/pgs/customer/ffsdfe3235sdfsdg32wg/services?includeDeleted=false
>
> I am trying to extract ffsdfe3235sdfsdg32wg from the above URL
>
> My Reg Ex expression is *customer/"(.+?)"/services
>
>
> On Wed, Jul 3, 2013 at 9:58 AM, hame <ha...@gmail.com> wrote:
>
> > Yes you can use two RegEx extractor on one HTTP Request.
> >
> >
> > On Wed, Jul 3, 2013 at 9:53 AM, umesh prajapati <praumesh86@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > Can we use 2 Regular Expression Extractor under one HTTP Request
> Sampler?
> > > The reason I am using 2 Regular Expression Extractor is because one Reg
> > Ex
> > > I am using to extract data from the response body and one Reg Ex
> > Extractor
> > > I am using to extract from request URL and save both the extracted data
> > > into a file.
> > >
> >
>

Re: Mulitple Reg Ex Extractor

Posted by umesh prajapati <pr...@gmail.com>.
the Reg Ex that i am using to extract from body is working fine but the Reg
Ex I am using to extract from url is giving me null value.

https://integratons.progressive.com/pgs/customer/ffsdfe3235sdfsdg32wg/services?includeDeleted=false

I am trying to extract ffsdfe3235sdfsdg32wg from the above URL

My Reg Ex expression is *customer/"(.+?)"/services


On Wed, Jul 3, 2013 at 9:58 AM, hame <ha...@gmail.com> wrote:

> Yes you can use two RegEx extractor on one HTTP Request.
>
>
> On Wed, Jul 3, 2013 at 9:53 AM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > Hi,
> >
> > Can we use 2 Regular Expression Extractor under one HTTP Request Sampler?
> > The reason I am using 2 Regular Expression Extractor is because one Reg
> Ex
> > I am using to extract data from the response body and one Reg Ex
> Extractor
> > I am using to extract from request URL and save both the extracted data
> > into a file.
> >
>

Re: Mulitple Reg Ex Extractor

Posted by hame <ha...@gmail.com>.
Yes you can use two RegEx extractor on one HTTP Request.


On Wed, Jul 3, 2013 at 9:53 AM, umesh prajapati <pr...@gmail.com>wrote:

> Hi,
>
> Can we use 2 Regular Expression Extractor under one HTTP Request Sampler?
> The reason I am using 2 Regular Expression Extractor is because one Reg Ex
> I am using to extract data from the response body and one Reg Ex Extractor
> I am using to extract from request URL and save both the extracted data
> into a file.
>