-1

enter image description here

Referring to above image I need to create a regex expression in JMeter for correlation of the 4 digit number which is dynamically changing. Can someone help me to create expression for the same?

I tried with \n replacing the enter button in span tag but was not getting the expected results.

vimuth
  • 5,064
  • 33
  • 79
  • 116

2 Answers2

0

You could try:

\r?\n\d{4}

This matches a CR?LF (enter) character followed by 4 digits.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
0

Using regular expressions for parsing HTML is not the best idea, I think you should consider using CSS Selector Extractor instead.

The relevant CSS Selector would be something like span[id=head_lblMagicno]

Demo:

enter image description here

More information: CSS Selectors Reference

Dmitri T
  • 159,985
  • 5
  • 83
  • 133