I have a JMeter Regular Expression Extractor which searches for the following regular expression:
myId=[0-9]{10}
This retrieves the 10 digit numeric id number from my websites form. I then set a “Reference Name” of myId for the id number. My template value is $0$ and my match No. is set to blank.
In my HTTP Request, I then pass a parameter value of:
${myId}
When I run my JMeter test, it inserts text in the form of:
myId=myId=1234567890
How do I get rid of the duplicate myId=?
Not sure about JMeter’s implementation of RegEx but normally
would match everything, including
myId=. What you need is to define capture groups that you want extracted using () and then you will reference the capture group array and get the item you want. E.g.group 0 would still be the whole thing but group 1 would be just the numeric portion as delimited by (), i.e. without
myId=. Hope this helps.