You should also be able to use expressions of the form

\d{8}

There is some discussion of Regexes in the JMeter FAQ with pointers to
further information - see 

http://wiki.apache.org/jakarta-jmeter/JMeterFAQ

I've started a page on Regular Expressions:

http://wiki.apache.org/jakarta-jmeter/RegularExpressions

Feel free to update with some examples.

S.
-----Original Message-----
From: BIJUMON RAMACHANDRAN [mailto:[EMAIL PROTECTED]
Sent: 24 March 2004 09:22
To: JMeter Users List
Subject: Re: Newb needs regular expression help


> 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 <[EMAIL PROTECTED]>
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:
> 
>   <frame name="visibleFrame"
>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


___________________________________________________________________________

This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail in
error, please notify the sender immediately and destroy it. As its integrity
cannot be secured on the Internet, the Atos Origin group liability cannot be
triggered for the message content. Although the sender endeavours to maintain
a computer virus-free network, the sender does not warrant that this
transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted. 
___________________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to