You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sebb <se...@gmail.com> on 2006/11/01 12:56:43 UTC

Re: Regular Expression Extractor

Variables are stored as strings, so you should not get a number format
exception unless you try to use the variable as a string.

If you don't need the second parameter, try using the following RE:

javascript:meetingInfo\((\d+)

S.
On 31/10/06, Padma <pa...@webex.com> wrote:
>
> I did change the template to $1$.
> The NumberFormatException is for the variable ${confID}.
> I did try changing the regular expression to javascript:meetingInfo\((\d+),
> (.+)\) to make sure the second group doesn't create any problem but with no
> use.
>
> Padma.
>
>
> Aycock, Glenn W. (JSC-IS)[TES] wrote:
> >
> > Well, since you said you need to extract '143395745', that would be the
> > first grouping, or $1$, not $2$. I suspect the NumberFormatException is
> > because  the size of the number represented ('1162305900000') might be
> > larger than the data type can accept.
> >
> > -----Original Message-----
> > From: Padma [mailto:padma.nimmagadda@webex.com]
> > Sent: Tuesday, October 31, 2006 2:45 PM
> > To: jmeter-user@jakarta.apache.org
> > Subject: RE: Regular Expression Extractor
> >
> >
> >
> > How are the variables represented - strings?
> > I get a NumberFormatException when I pass the variable to another HTTP
> > sampler in the request.
> > I changed the regular expression to javascript:meetingInfo\((\d+),
> > (\d+)\) But it doesn't help.
> >
> > -Padma
> >
> >
> > Aycock, Glenn W. (JSC-IS)[TES] wrote:
> >>
> >> You need to escape the original () like this:
> >>
> >> javascript:meetingInfo\((.+?), (.+?)\)
> >>
> >> Glenn
> >>
> >> -----Original Message-----
> >> From: Padma [mailto:padma.nimmagadda@webex.com]
> >> Sent: Tuesday, October 31, 2006 2:09 PM
> >> To: jmeter-user@jakarta.apache.org
> >> Subject: Regular Expression Extractor
> >>
> >>
> >> I have a response like this:
> >> javascript:meetingInfo(143395745, 1162305900000)
> >>
> >> JMeter Test Plan for MC
> >>
> >> I need to extract '143395745' from it
> >>
> >> I tried the following:
> >> Reference Name : - confID
> >> Regular Expression :-  javascript:meetingInfo((.+?), (.+?))
> >>
> >> JMeter Test Plan for MC
> >> Template :- $2$
> >> Match No :- 1
> >>
> >> But the variable is not populated correctly.
> >>
> >> If I assign the Regular Expression Extractor post processor to a HTTP
> >> sampler, can I use the variable ${confID} in a subsequent HTTP sampler
> >
> >> request?
> >>
> >> But
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Regular-Expression-Extractor-tf2548121.html#a710
> >> 16
> >> 83
> >> 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
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Regular-Expression-Extractor-tf2548121.html#a71023
> > 02
> > 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
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Regular-Expression-Extractor-tf2548121.html#a7102713
> 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