Reputation: 235
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:
viewstate\|/(.+?)=
This is working fine.VIEWSTATE|/wEPDwUJMjUyODUxNTQzEGRkFgJmD2QWAgIED2QWBAIJDw8WAh4EVGV4dAWKATxiPldlbGNvbWUmbmJzcDs8L2I+WFlaIEVGRzgxNzEgQUJDPGI+Jm5ic3A7QXMmbmJzcDs8L2I+UmFkaW9sb2dpc3Q8YnIgLz48Yj5EYXRlOiAmbmJzcDs8L2I+MTktQXByLTIwMTI8Yj4mbmJzcDtMb2NhdGlvbjombmJzcDs8L2I+ TU1QaGFybWFjeTEkZGdyTU0PZ2Q=
Any Idea why this is happening like this ?
Upvotes: 0
Views: 450
Reputation: 336368
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):
viewstate\|\/([^=]+)
Upvotes: 2