Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 86069 invoked from network); 24 Mar 2004 09:22:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Mar 2004 09:22:17 -0000 Received: (qmail 22721 invoked by uid 500); 24 Mar 2004 09:21:49 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 22697 invoked by uid 500); 24 Mar 2004 09:21:49 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 22683 invoked from network); 24 Mar 2004 09:21:49 -0000 Received: from unknown (HELO web12702.mail.yahoo.com) (216.136.173.239) by daedalus.apache.org with SMTP; 24 Mar 2004 09:21:49 -0000 Message-ID: <20040324092202.99297.qmail@web12702.mail.yahoo.com> Received: from [212.185.164.140] by web12702.mail.yahoo.com via HTTP; Wed, 24 Mar 2004 01:22:02 PST Date: Wed, 24 Mar 2004 01:22:02 -0800 (PST) From: BIJUMON RAMACHANDRAN Subject: Re: Newb needs regular expression help To: JMeter Users List In-Reply-To: <004501c4111c$a4d3ffd0$6403a8c0@nealoconnellxp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > Ref Name: SessionID > Reg Expr: if it is of standard length (mix char & digits) just use following format (example: of length 8 means) (\w\w\w\w\w\w\w\w) or if it is just digits (example: of length 8 means) (\d\d\d\d\d\d\d\d) > Template: $1$ > Match No: 0 > Default: 0 biju --- Neal O'Connell wrote: > I'm having a little trouble with regular > expressions. Here is the basic > flow of the web application when used in a browser > > - User requests page > - Server returns a frameset (the requested page is > in the frameset). A link > on the frameset page includes a query parameter that > has a unique identifier > for session tracking (SessionID is the variable > name) > > General layout of my script is (using v1.9.1) > > - Thread Group > - First Page (GET) (returns a frameset) > - Regular Expression Extractor to get SessionID > - Second page (POST) (passes SessionID as a > variable) > > My regular expression has the following properties > > Ref Name: SessionID > Reg Expr: (SessionID=)(.*)([&"]) > Template: $2$ > Match No: 1 > Default: 0 > > I'm obviously missing something, because when I > monitor the server I can see > that the SessionID that gets POSTed with the second > page has a default value > of 0 rather than what should have been parsed out of > the extractor. > > From my (albeit minimal) understanding of regular > expressions, I expect that > this will look for text in the response that fits > the pattern: > > Starts with "SessionID=" > Ends with " or & > Can have 0 or more characters in between. > > And the parantheses break the expression into three > groups: > 1 - "SessionID" string literal > 2 - SessionID value > 3 - " or & character > > So setting the Template to $2$ means put the second > group into the variable. > > A snippet from the frameset might help: > > src="mainpage.htm?InstanceID=1193356129&SessionID=wiQHYYlHzYEokrCo"> > > > Can somebody please help me out? Maybe I just need > to find a quality > regular expressions tutorial... > > > Thanks! > > Neal O'Connell | Developer > Phone: 859.245.3841 | Fax: 715.287.4499 > MI-Assistant - A Division of Fiserv, FSC > 26550 W. Mondovi Street | Eleva, WI 54738 > http://www.mi-assistant.com > > __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org