Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 56324 invoked from network); 25 Jan 2007 01:42:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jan 2007 01:42:38 -0000 Received: (qmail 5511 invoked by uid 500); 25 Jan 2007 01:42:43 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 5490 invoked by uid 500); 25 Jan 2007 01:42:43 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 5479 invoked by uid 99); 25 Jan 2007 01:42:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 17:42:43 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of sebbaz@gmail.com designates 66.249.92.175 as permitted sender) Received: from [66.249.92.175] (HELO ug-out-1314.google.com) (66.249.92.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 17:42:34 -0800 Received: by ug-out-1314.google.com with SMTP id 32so293478ugm for ; Wed, 24 Jan 2007 17:42:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oVfgnIFYUQLee1L1xUIOhDh6LABaxyyYfVQnXPoNZO7wo35wMNXaIRUBs7BreP7QK1xwJ2SxhuhQnvFawCEiCJgHXhxMndnJdeefSaRFRsKWDPeUcg4YYvzLPBaAVZNXzHLn/4ePpPie8ycy+y9ZRyTzhCpMcmMeDmjMOBvlUxA= Received: by 10.78.81.20 with SMTP id e20mr1265635hub.1169689332656; Wed, 24 Jan 2007 17:42:12 -0800 (PST) Received: by 10.78.90.1 with HTTP; Wed, 24 Jan 2007 17:42:12 -0800 (PST) Message-ID: <25aac9fc0701241742y678bb771oefee1cd95a83a4f8@mail.gmail.com> Date: Thu, 25 Jan 2007 01:42:12 +0000 From: sebb To: "JMeter Users List" Subject: Re: Dynamic Parameters with RegEx In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org On 25/01/07, Surendra Viswanadham wrote: > Hi, > > I am writing a simple test script for testing a web application. I am trying > to extract a parameter from the response of a request and use it as part of > subsequent requests. > > Example > ------------ > > if the response had the following data: > ............. > > I want to extract 123456 which i know is going to be a 6 digit number. I > tried the following after adding a regular expresion extractor as the post > processor for the request obtaining this response. > > Ref Name: ref1 > Regular Expression: param2=([\d{6}]) The [ and ] are used to enclose character classes, i.e. [abc] means a or b or c - but only one such character. What you need is param2="(\d{6})" You need the final " otherwise it would match: param2="1234567 > Template: $1$ > Match No: 0 0 means pick a random match - did you mean that? > Default Value: > > That script is never successful and goes to the default value. > > 1) Is the script right or is there something else wrong? > 2) Do i need to declare ref1 in the user variables component or is it > implicit once i give it as a ref name ( I tried both ways) > > Any ideas would help. Thanks. > > Surendra > > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org