0

I want to use Regular expression extractor to extract data from HTML body, but I'm new at Regular expression and I don't really understand how it works.

I want to extract bb079382-e3e3-430d-a34e-18a406bb5419 value from rfb.connect("beta.anatobrace.com", port, "bb079382-e3e3-430d-a34e-18a406bb5419", path);

user7294900
  • 47,183
  • 17
  • 74
  • 157
Léandre
  • 103
  • 10

2 Answers2

2

You need to include alphanumeric and dash character after port, in your case:

beta.anatobrace.com", port, "([\-\w]+)

Of course use Template $1$ and Match No. 1

user7294900
  • 47,183
  • 17
  • 74
  • 157
1

If you don't feel comfortable enough with Regular Expressions you can almost always go for Boundary Extractor instead. In basically extracts what it will find between the "Left Boundary" and the "Right Boundary" so if you set:

  • Left Boundary: rfb.connect("beta.anatobrace.com", port, "
  • Right Boundary: ", path);

You will get your ID in between.

Boundary Extractor Demo

Moreover, Boundary Extractor consumes less resources so you will be able to simulate more virtual user from a single machine comparing to using Regular Expressions Extractor. See The Boundary Extractor vs. the Regular Expression Extractor in JMeter article for more details.

Dmitri T
  • 119,313
  • 3
  • 56
  • 104