I marked one peculiar thing in regular expression in jmeter:
My aim is to capture a substring of the following text (marked in bold) using regular expressions. For this I tried the following:
- I have selected “Text” from the “View Result tree” box and click on
“Regular Expression” check box and then use regular expression
viewstate\|/(.+?)=This is working fine. - But the same regular expression is not working when I am using
“RegExp Tester” from drop down.
VIEWSTATE|/wEPDwUJMjUyODUxNTQzEGRkFgJmD2QWAgIED2QWBAIJDw8WAh4EVGV4dAWKATxiPldlbGNvbWUmbmJzcDs8L2I+WFlaIEVGRzgxNzEgQUJDPGI+Jm5ic3A7QXMmbmJzcDs8L2I+UmFkaW9sb2dpc3Q8YnIgLz48Yj5EYXRlOiAmbmJzcDs8L2I+MTktQXByLTIwMTI8Yj4mbmJzcDtMb2NhdGlvbjombmJzcDs8L2I+ TU1QaGFybWFjeTEkZGdyTU0PZ2Q=
Any Idea why this is happening like this ?
Just a shot in the dark: Try
viewstate\|\/(.+?)=and see if that works.The rationale behind my guess:
/might get misinterpreted as the regex delimiter, cutting short your regex.Another idea (which would help if there were newlines in the input string that the
.isn’t matching):