资料内容:
The Regular Expression Extractor contains these fields:
• Reference Name - the name of the variable that can be used after extraction
Regular Expression - a sequence of symbols and characters expressing a string (pattern)
that will be searched for within the text
•
Template - contains references to the groups. As a regex may have more than one group, it
allows to specify which group value to extract by specifying the group number as $1$ or $2$
or $1$$2$ (extract both groups)
•
Match No. - specifies which match will be used (0 value matches random values / any
positive number N means to select the Nth match / negative value needs to be used with the
ForEach Controller)
•
Default - the default value which will be stored into the variable in case no matches are
found, is stored in the variable.
•
The “Apply to” checkbox deals with samples that make requests for embedded resources. This
parameter defines whether Regular Expression will be applied to the main sample results or to all
requests, including embedded resources. There are several options for this param:
• Main sample and sub-samples
• Main sample only
• Sub-samples only
• JMeter Variable - the assertion is applied to the contents of the named variable, which can