user1851304
user1851304

Reputation: 61

JMeter regular expression extractor from a variable

I'm trying to extract a number from string in single quotes.

For example: '0000123' in JMeter. This string comes from a CSV file configured in CSV data config.

Upvotes: 1

Views: 4773

Answers (1)

Dmitri T
Dmitri T

Reputation: 168157

Relevant regular expression extractor configuration will look like:

  • Apply to: JMeter Variable. Provide variable name which holds that 0000123 value.
  • Reference Name: anything meaningful, you can re-use the same variable name - it will be overwritten.
  • Regular Expression: (\d+)
  • Template: $1$
  • Other fields can be left as they are

See image below for configuration applied example and Using RegEx (Regular Expression Extractor) with JMeter guide for more information on the domain.

Regular Expression Extractor

Upvotes: 3

Related Questions