Hi, Kyle and all Jmeter Users, 

Thanks for your suggestion, and based on the previuos experience, I know the 
Regular Expression Extractor can specify the match group to extract the target 
value. However, in my case, my target test may not in the same order all the 
way, it will change their order, so I may not be able to extract the target 
text. So far, I only can randomly extract the value with match, and group, but 
I cannot know which target text I am extracting from, since my target text may 
change everytime I hit that page.

Sincerely, 

Avian


-----Original Message-----
From: Kyle McAbee [mailto:[EMAIL PROTECTED]
Sent: Monday, December 20, 2004 2:00 PM
To: JMeter Users List
Subject: RE: question of Regex


Dear Avian Liao and JMeter Users:

Based on your example, the following regular expression matches a URL and 
target name. For each match, the URL and target name are stored in a group 
(sometimes called a submatch in the Microsoft Windows world). The tricky bit is 
using [\s]+ to skip one or more "white space" characters. White space 
characters include Space, Tab, and EOL (end-of-line).

In the Regular Expression Extractor, set the Match No. parameter to -1 (minus 
one) to extract all matches. Then use the appropriate predefined variable names 
to get the groups: refName_1_g1, refName_1_g2, and so on, where refName is the 
value of the Reference Name parameter.

Regex: <A HREF='([^<]+)</A></td>[\s]+<td >([^<]+)</td>

For example given, results follow . . .

Match 1:
"<A HREF='https://erfx.uat.enporion.com/instance/processPost>Select</A></td>"
<td >  Avaya                                             </td>"
Match 1, group 1:
"https://erfx.uat.enporion.com/instance/processPost>Select"
Match 1, group 2:
"  Avaya                                             "

Match 2:
"<A HREF='https://erfx.uat.enporion.com/instance/processPost>Select</A></td>
<td >  Beata                                       </td>"
Match 2, group 1:
"https://erfx.uat.enporion.com/instance/processPost>Select"
Match 2, group 2:
"  Beata                                       "

Sincerely yours,

Kyle

-----Original Message-----
From: Liao, Avian [mailto:[EMAIL PROTECTED]
Sent: Monday, December 20, 2004 2:03 PM
To: Jmeter Question (E-mail)
Subject: question of Regex


Hi, all, 


I have page, that is simliar to this, 

You may notice that all the link are set between <a> select </a>, and followed 
with some target name (like Avaya, or Beata), the hard part that I cannot 
resolved is that I only can use Regex to catch the value if the <a> </a> is put 
between the target name(since they are unique), but when the link is set 
between 'select' --(they are all identical), I cannot retrive the value I want. 
Is there anyway, that I can retrieve the value after 'A Href=' and still can 
reference to any target name, like 'Avaya' or Beata'.

My goal is to catch ' https://erfx.uat.enporion.com/instance/processPost'

Hope I make my question clear, and thanks for your time.
----------------------------------------------------------------------------------------------------------
<tr>
<td ><A HREF='https://erfx.uat.enporion.com/instance/processPost>Select</A></td>
<td >  Avaya                                             </td>
<td >Supplier</td>
</tr>
 
<tr>
<td ><A HREF='https://erfx.uat.enporion.com/instance/processPost>Select</A></td>
<td >  Beata                                       </td>
<td >Supplier</td>
</tr>
-------------------------------------------------------------------------------------------





---------------------------------------------------------------------
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]

Reply via email to