or variable name = whateveryouwanttouse Regex = ({[^}]*}) => Capture(represent by '(' ) the character '{' followed by any character(the [] not to be confused with the Json []) which is not(the ^) a '}' , any amount of times (the *) followed by a '}' , end capturing Template = $1$ Match no = 1 Default = NOT FOUND
(Regex does not deal with if your values in the JSON themselves have } or if the JSON has newline characters) Then ensure that you have the regex post processor as a *child* of the sampler that returns the JSON string. If it still doesnt work , add a debug sampler after the sampler returning the JSON and add a view results tree listener and check the Response you are getting for the sampler which is returning the JSON. Post the exact response here. Also check the response of the Debug Sampler and see the value for the variable name you specified in the regex, if it is correct here, then you are making a mistake when you are using the variable regards deepak On Wed, Jun 8, 2011 at 8:33 AM, zinedine <aspat...@avaya.com> wrote: > It doesn't work as you said, and what I have is a variable JSON, that is > why > I need to get it before put it in another request. > I just need a regular expresion that helps me get rid of the [ ] brackets > at > the beggining and at the end of the expression...but I don't know how to > make it.. > > -- > View this message in context: > http://jmeter.512774.n5.nabble.com/regex-to-mach-a-json-tp4469591p4469896.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > >