Although it's solved, I suggest you to change the RegEx to this: content="([^"]+)" name="csrf-token" It's simpler and, this way, you will not bother about what is inside the quotation marks. If the content attribute's value should contain quotation marks (what I suppose will be escaped), you could use this: content="([^"[\\"]]*)" name="csrf-token"
2013/3/26 Aaron Tracy <[email protected]> > Thanks Sebb! That fixed it! ;) > > -----Original Message----- > From: sebb [mailto:[email protected]] > Sent: Tuesday, March 26, 2013 4:41 PM > To: JMeter Users List > Subject: Re: Regular Expression Extractor Returns Spaces instead of > characters > > On 26 March 2013 22:19, Aaron Tracy <[email protected]> wrote: > > Hi! > > > > I've got a regular expression ( > content=\"([A-Za-z0-9!"#$%&'()*+,./:;<=>?@\^_`{|}~-]+)\" name="csrf-token ) > That grabs my authentication token, the problem that I'm having is that > when I use the variable that should have my authentication token that looks > like this: > > > > ELVM+rEgERKSGA4d9mld+PiMf1dRtub9wuuBE1rKflM= > > > > Is stored in the variable and used in another request, the + and = are > stripped from the token and > > Check the contents of the variable using a Debug Sampler. > > How/where is the variable being used? > > > ELVM rEgERKSGA4d9mld PiMf1dRtub9wuuBE1rKflM > > > > Is used instead which causes my script to break. I've tried to wrap a > function around it to replace all spaces with a + but that didn't work ( > not to mention this doesn't handle the missing = ). How do I escape the + > and = characters so the variable retains the + and = signs? > > > > Thank you! > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
