It's not clear to me what you are trying to do. If you want to use the same datetime value in two different samplers, then define the variable in a User Parameters test element, and use the variable where necesssary.
If the datetime is to be extracted from a server response, then most likely the datetime will be in the response body, not the response URL. Indeed the example you gave: name="datetime" value="(.+?)" cannot possibly match a URL as it contains a space and "?", neither of which are allowed in URLs. On 14/06/07, Rushabh Doshi <[EMAIL PROTECTED]> wrote:
Kindly accept my apologies for late reply. Yes I am sure datetime field is in the URL. Actually what we are doing is in User parameter we have called Java script and defined Variable named "Time = ${_javascript = datetime() Same we have put it in the URL like... https://test.xx.yyyy.com/repo/GenerateReportController?action_id=9999&is Template=false&datetime=${GenerateDate} Regular expression defined is a child of the above request, Here when above request is sent to the server then I can able to see right value (datetime) in the Request tab page and same value I need to passes in the next URL using Regex, perfectly the ${RF_TD} is used in the next http request. Please note that we need to get the value from request (URL) itself not Response data. Sebb, I have doubt that Regex is not working, if we would like to get the value from URL itself then. Thanks & Regards, Rushabh -----Original Message----- From: sebb [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 10:01 PM To: JMeter Users List Subject: Re: Help Needed For Regular Expression Are you sure that the datetime field is in the URL? Surely it is in the page content, in which case you need to check "Body". On 13/06/07, Remmerswaal, Marcel <[EMAIL PROTECTED]> wrote: > I know it sounds a litle bit crazy but are you sure that you did not put any spacebar during typing the Reference Name. > The %24%7BRF_TD%7D will only appeare if he did not get any value. If he gets a value this will not happen. > So this means two things: one the regular expression is wrong and this will not put any value in RF_TD (maybe the expression is not unique). > Two there are some difference in the variable. like an invisible space tab or enter > > Otherwise Sorry I cannot help you I just tried it at some of my scripts and what ever I fill in it just works correctly > > kind regards > > Marcel > > ________________________________ > > From: Rushabh Doshi [mailto:[EMAIL PROTECTED] > Sent: Wed 13/06/2007 14:16 > To: JMeter Users List > Subject: RE: Help Needed For Regular Expression > > > > Thanks for your prompt reply. > > What ever you have suggested I tried but still it is not working for me. > > In the Request tab page Post data showing like this %24%7BRF_TD%7D > > Following things are already have it properly in my script. > > --> Regular expression is a child of the request > --> URL radio button is selected > > Kindly help me more on it. > > > Thanks Regards, > Rushabh Doshi > > Asite Solutions Pvt. Ltd. > Delivering Data Logistics > http://www.asite.com <http://www.asite.com/> > E [EMAIL PROTECTED] > M +91 (0)9427026084 > > > -----Original Message----- > From: Remmerswaal, Marcel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 13, 2007 4:39 PM > To: JMeter Users List > Subject: RE: Help Needed For Regular Expression > > Be sure that the regular expression is a child of the request. > be sure that "response field to check" url radio button is select as you > say you want it from the url > > Did you used the ${RF_TD} in the next http request? > you can also try to use (.*?) or match no. = 1 > > it should work like this. I always use it like this and is working fine > by me. > > > ________________________________ > > From: Rushabh Doshi [mailto:[EMAIL PROTECTED] > Sent: Wed 13/06/2007 13:03 > To: JMeter Users List > Subject: Help Needed For Regular Expression > > > > Hello, > > > > Consider the following Scenario > > > > We are using JMeter 2.2 version, There is one HTTP Client request, at > URL side system is generating DateTime (Runtime) that value we need to > pass it in next HTTP client request. > > > > For this we are using Regular expression to get this value from URL > (HTTP Client request) but in next HTTP request doesn't passes the > correct value, In View result tree, it shown Regular expression name > instead of Value. > > > > Listed Regular expression we have used. > > > > Reference Name: RF_TD > > Regular Expression: name="datetime" value="(.+?)" > > Template: $1$ > > Match No: 0 > > > > Thanks in advance. > > > > Rushabh Doshi > > > > > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be > copied, disclosed to, retained or used by, any other party. If you are > not an intended recipient then please promptly delete this e-mail and > any attachment and all copies and inform the sender. Thank you. > > > --------------------------------------------------------------------- > 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]