Sorry, I can't help you here - I don't know JavaScript. 

You could check mozillla.org for Rhino documentation.

S.
On Wed, 27 Oct 2004 13:13:39 -0700, Senthil Subbiah <[EMAIL PROTECTED]> wrote:
> Hi Sebb,
> 
> I have a regular expression, which extracts a match and stores it in a
> variable.
> For ex.,
> Str is the variable
> The value stored in str is...
> 
> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
> &lt;!DOCTYPE cXML SYSTEM
> &quot;http://xml.cXML.org/schemas/cXML/1.1.009/cXML.dtd&quot;&gt;
> 
> I want to replace the '&lt;' to '<' and '&gt;' to '>' and '&quot' to '"'
> 
> Using the javascript replace I am able to do it, provided the extracted
> value is juz in a single line.
> 
> Where as if the extracted value runs for more than a line....the request
> is not getting processed.
> 
> Can you please suggest?
> 
> 
> 
> Thanks
> Senthil
> 
> --Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 27, 2004 5:05 AM
> To: JMeter Users List
> Subject: Re: What are the JavaScript functions that I can use in Jmeter?
> 
> See "16.3 Writing the function string" in the function reference
> document
> 
> You need to escape commas in parameters to the function call.
> 
> BTW, always check the jmeter.log file if something does not behave as
> expected.
> 
> S.
> On Tue, 26 Oct 2004 19:06:05 -0700, Senthil Subbiah
> <[EMAIL PROTECTED]> wrote:
> > Hi Nicole,
> > Thanks for the response.
> > Thatz exactly what I tried...but I am not able to replace the string.
> >
> > ${__javaScript(('Hello'.replace('ello', 'i')),tempStr)}
> >
> > This is the syntax I used....and its not working..
> >
> > Please suggest me...
> >
> > Thanks
> > senthil
> >
> >
> >
> >
> > -----Original Message-----
> > From: nlunebur [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 26, 2004 7:02 PM
> > To: JMeter Users List
> > Subject: Re: What are the JavaScript functions that I can use in
> > Jmeter?
> >
> > hi senthil,
> > as according the the docs
> > (http://jakarta.apache.org/jmeter/usermanual/functions.html)
> > you can use any javascript functions u wish, the ones mentioned there
> > are only examples.
> >
> > i am not familiar with javscript so u will have to look up how to do
> > string replacement (i think it is something like
> > 'Hello'.replace('ello', 'i'), which would give the output 'Hi', you'll
> 
> > have to look it up).
> >
> > hope this helps!
> > nicole
> >
> > Senthil Subbiah wrote:
> >
> > >Hi All,
> > >
> > >What are the JavaScript functions that I can use in Jmeter? In the
> > >docs its given as date, time, math functions can be use.
> > >
> > >I need to do a string replacement before I send that parameter to the
> 
> > >request. Can you please suggest me how to do this?
> > >
> > >Thanks
> > >Senthil
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to