On 31/07/07, Avishek Daga <[EMAIL PROTECTED]> wrote:
>
> In a bean shell script a jmeter variable is accessed as
> vars.get("jmeter_variable_name")
>
> Hence, your code should be
> print(vars.get("url"));
> prout = vars.get("url");
> .
That's only necessary if the variable can contain double-quote characters.
> .
> .
>
>
> 75blured wrote:
> >
> > Hi,
> >
> > I've finally opted for a bean shell post processor:
> > import java.util.regex.*;
> >
> > ------------------< cut here >------------------------------------
> > print("${url}");
> >
> > prout = ${url};
That should be
prout = "${url}";
> > patternStr = "&";
> > replacementStr = "&";
> >
> > // Compile regular expression
> > pattern = Pattern.compile(patternStr);
> >
> > // Replace all occurrences of pattern in input
> > matcher = pattern.matcher(prout);
> > output = matcher.replaceAll(replacementStr);
> > print("output : " + output);
> > ------------------< cut here >------------------------------------
> >
> > However it seems to not find ${url} when assigning it to prout variable
> > ...
> >
> > Do you know a way to do it ?
> >
> > Regards,
> > 75Blured.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/search---replace-tf4170716.html#a11920761
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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]