Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 34437 invoked from network); 7 Apr 2010 20:15:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Apr 2010 20:15:11 -0000 Received: (qmail 14816 invoked by uid 500); 7 Apr 2010 20:15:11 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 14682 invoked by uid 500); 7 Apr 2010 20:15:11 -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 14674 invoked by uid 99); 7 Apr 2010 20:15:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Apr 2010 20:15:11 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sv@icarinae.com designates 66.147.249.253 as permitted sender) Received: from [66.147.249.253] (HELO outbound-mail-359.bluehost.com) (66.147.249.253) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 07 Apr 2010 20:15:02 +0000 Received: (qmail 16806 invoked by uid 0); 7 Apr 2010 20:14:41 -0000 Received: from unknown (HELO box444.bluehost.com) (69.89.31.244) by oproxy1.bluehost.com.bluehost.com with SMTP; 7 Apr 2010 20:14:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=icarinae.com; h=Message-ID:Date:From:To:Subject:References:In-Reply-To:MIME-Version:Content-Type:Content-Disposition:Content-Transfer-Encoding:User-Agent:X-Identified-User; b=eFyKV6uXnlS8oOt7SnNMbPjCq2GY5RWr4dC391BtkpWXExvXkwIXx8yDL9zmjF1oXYpHHOgRWx0yLcdGxGAddI4uFlLEVZKHwNUlhTmyKeD5xtXMMTdVLw79q7m9a6LQ; Received: from localhost ([127.0.0.1]) by box444.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1Nzbe4-0008PD-UZ for jmeter-user@jakarta.apache.org; Wed, 07 Apr 2010 14:14:40 -0600 Received: from 216.52.235.101 ([216.52.235.101]) by icarinae.com (Horde MIME library) with HTTP; Wed, 07 Apr 2010 14:14:40 -0600 Message-ID: <20100407141440.5kciwkgc0o8gck0g@icarinae.com> Date: Wed, 07 Apr 2010 14:14:40 -0600 From: sv@icarinae.com To: jmeter-user@jakarta.apache.org Subject: Re: Jmeter replace References: <28160253.post@talk.nabble.com> <28167080.post@talk.nabble.com> <28168501.post@talk.nabble.com> <20100407134939.0x96fhi0604wc844@icarinae.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) X-Identified-User: {1126:box444.bluehost.com:icarinae:icarinae.com} {sentby:smtp auth 127.0.0.1 authed with sv@icarinae.com} X-Virus-Checked: Checked by ClamAV on apache.org Thanks working now... Quoting Deepak Shetty : > Hi > You should probably use > str =3D vars.get("MyVar"); > str=3Dstr.replaceAll("111", > "222"); > > regards > deepak > > > > On Wed, Apr 7, 2010 at 1:01 PM, Deepak Shetty wrote: > >> if your code is literal then you havent closed the quote >> str =3D "${MyVar} >> >> Check if there are beanshell errors. if not check that you dont have any >> whitespace in the xml(or change the replace all to be a regexp that will >> match) >> >> regards >> deepak >> >> >> >> On Wed, Apr 7, 2010 at 12:49 PM, wrote: >> >>> Hi, >>> >>> I have a xml request, that I have saved in a variable. There is timestam= p >>> parameter that I need to update with system time. >>> >>> I understand that i can get time using time function, however I have to >>> replace the value in the xml. >>> >>> for example 111 to be replaced with >>> 222 >>> >>> Is there any way I can replace that value in the xml that is saved >>> ${MyVar}. >>> >>> I tried using str =3D "${MyVar}; >>> str=3Dstr.replaceAll("111", >>> "222"); >>> in beanshell sampler, but it looks like " need to escaped etc.. >>> >>> Any other solution? >>> >>> Thanks in advance.. >>> >>> Deepak Tiwari >>> >>> >>> >>> --------------------------------------------------------------------- >>> 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