-2

Response text from sampler is :

<input type="hidden" name="pid" value="PID_1498281212971253461">

The basic reg ex extractor mentioned for most of the correlations is (.+?). I have read the basics of the reg ex by googling and trying to understand reg ex better Base on the understanding, I tried Reg Ex (2nd Reg Ex) which I am not getting any matches.

Extractor1: RegEx1 Extractor2:RegEx2

Pls. help me in understanding. Appreciate your help. This is my first post in any channel, pls ignore any comm errors.

Sapri
  • 3
  • 2

2 Answers2

0

You're almost there, your regular expression is basically missing a repetition meta character to wit +. In its current state it will match only something like <input type="hidden" name="pid" value="PD_1">

So you need to add + sign to the end of each character classes groups and your regular expression should start working as expected

JMeter Regular Expression Extractor

References:


When it comes to parsing HTML responses using regular expressions is not the best option, you might want to consider using CSS/JQUery Extractor instead

JMeter CSS/JQuery Demo

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks a lot for the solution and suggestion. I will work on the CSS/JQuery Extractor going forward :) – Sapri Jun 28 '17 at 06:24
0

You could use the XPath Extractor instead, will be simpler, here is the XPath to use

//*[@name='pid']/@value

Please make sure, you check the options, Use Tidy and Quiet in the XPath Extractor

manish
  • 96
  • 3