jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willingham Geoff" <>
Subject RE: JMeter __regexFunction
Date Fri, 07 Jul 2006 07:44:28 GMT
I had the same problem - I ended up writing a new RegEx post processor to solve the problem.

Will try to package up and email to you later


-----Original Message-----
From: Carl Nygaard (カール) [] 
Sent: 07 July 2006 02:28
Subject: JMeter __regexFunction

I have faith in JMeter; I just know there is some way to do this.

I'm trying to do an http post request.  The post is based on a form that can have a variable
number of parameters.  These parameters are caused by html like this:

<select name="p" multiple id="p">  <option value="a"
selected>a</option>  <option value="b" selected>b</option> ...

Note that everything is on one line.  I would like to match every one of the possible values
in the form and submit them as selected.

I hunted through the mailing list archives and found that the __regexFunction is a handy way
to get around the problem of not having a variable number of parameters.  So I made this up:

${__regexFunction(<option value="([^"]*)" selected>,p=$1$,ALL,&,,variableName)}

My hope was that this would result in the expression:


which could be added (with some trickery) to the parameter list of the request.  What i get
is this:


It only matches ONE of the expressions, not all of them.  I assume it is because they are
all on the same line, but despite my attempts to use fancier regular expressions, I simply
can't get it to match all of them.  Does anyone have any ideas how to do this?


To unsubscribe, e-mail:
For additional commands, e-mail:

This e-mail is confidential and privileged. If you are not the intended recipient please accept
our apologies; please do not disclose, copy or distribute information in this e-mail or take
any action in reliance on its contents: to do so is strictly prohibited and may be unlawful.
Please inform us that this message has gone astray before deleting it. Thank you for your

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message