On 08/09/2008, Mathumathi Palani Bommu, EAS-Chennai <[EMAIL PROTECTED]> wrote:
>
>  Add Regular Expression extractor and provide the values as
>  Reference name:session
>  Regular Expression :<input type=hidden name=userSession> value=(.*)

I think that will capture too much as "." also matches any ">" it finds.
Also, there is an extraneous ">" in the RE.

Should probably be

Regular Expression :<input type=hidden name=userSession value=(.*?)>

The ? makes it stop at the first match (non-greedy).

It would be a bit quicker to put:

Regular Expression :<input type=hidden name=userSession value=([^>]+)

which will match all characters that are not ">" - this is an easier
search to perform.

If the value can be on a separate line, then you will need to use:

Regular Expression :<input type=hidden name=userSession\s+value=([^>]+)

Attributes are normally enclosed in quotes, in which case the RE need adjusting:

Regular Expression :<input type="hidden" name="userSession"\s+value="[^"]+

>  Template:$1$
>  Match #:0
>

Add a Default value so you can tell whether or not the RE was applied
successfully.
[And check the log just in case of syntax errors as these will not be
reported to the GUI]

>
>  U can use the sessionid value captured Regular expression extractor as
>  ${session} in the further requests
>
>
>  -----Original Message-----
>  From: Banerjee, Tapan [mailto:[EMAIL PROTECTED]
>  Sent: Monday, September 08, 2008 9:24 AM
>  To: jmeter-user@jakarta.apache.org
>  Subject: Regular Expression Extractor-Help Needed
>
>  >       Can u help me out in using Regular Expression Extractor...?
>  >       I need to capture a value which actually is a session id...I've
>  tried
>  > vit various expressions bt of no use...
>  >
>  >       <form method=post action=login.pl target=body>
>  >       <input type=hidden name=userSession
>  > value=98117.6678817335fAtzQcHpftVzzzzHDAciVpfzfcf>
>  >       <table border=0><tr><td>&nbsp;</td>
>  >
>  >       In the above HTML code, I need to capture the value highlighted.
>         I've tried hundreds of various regular expressions whch includes
>  *.* also...but of no use..
>         Kindly give some suggestions on how can I capture it and also
>  how can I use the same value in my script where-evr needed...
>  > Thanks & Regards
>  > Tapan Banerjee
>  > EMail: [EMAIL PROTECTED]
>
>  Confidential: This electronic message and all contents contain
>  information from Syntel, Inc. which may be privileged, confidential or
>  otherwise protected from disclosure. The information is intended to be
>  for the addressee only. If you are not the addressee, any disclosure,
>  copy, distribution or use of the contents of this message is prohibited.
>  If you have received this electronic message in error, please notify the
>  sender immediately and destroy the original message and all copies.
>
>  Confidential: This electronic message and all contents contain
>  information from Syntel, Inc. which may be privileged, confidential or
>  otherwise protected from disclosure. The information is intended to be
>  for the addressee only. If you are not the addressee, any disclosure,
>  copy, distribution or use of the contents of this message is prohibited.
>  If you have received this electronic message in error, please notify the
>  sender immediately and destroy the original message and all copies.
>
>
>
> DISCLAIMER:
>  
> -----------------------------------------------------------------------------------------------------------------------
>
>  The contents of this e-mail and any attachment(s) are confidential and 
> intended for the named recipient(s) only.
>  It shall not attach any liability on the originator or HCL or its 
> affiliates. Any views or opinions presented in
>  this email are solely those of the author and may not necessarily reflect 
> the opinions of HCL or its affiliates.
>  Any form of reproduction, dissemination, copying, disclosure, modification, 
> distribution and / or publication of
>  this message without the prior written consent of the author of this e-mail 
> is strictly prohibited. If you have
>  received this email in error please delete it and notify the sender 
> immediately. Before opening any mail and
>  attachments please check them for viruses and defect.
>
>  
> -----------------------------------------------------------------------------------------------------------------------
>
>  ---------------------------------------------------------------------
>  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]

Reply via email to