jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Cysne <flaviocy...@gmail.com>
Subject Re: Regular expression extraction
Date Fri, 06 Jul 2012 11:28:48 GMT
First things first, %2F, %3D, %2B are hexadecimal ascii representations of
special characters like /, :, &, %, etc.

If you want to avoid these representations you can use the regex bellow.

\?RelayState=\w+&SAMLart=\w+%2B(\w+)%[a-zA-Z0-9]{2}(\w+)%[a-zA-Z0-9]{2}

You have to repeat this regex in two Regular Expression Extractors: one to
retrieve $1$ (the first group) and the other for $2$ (the second group).
I'm assuming that these values will be used as parameters values in other
requests and you'll need the entire values extracted among %2B, %2F and %3D.

If could explain a bit more of what you want to do, it'll be easier to
answer.

I'm using "Regular Expression Tester" firefox plugin to test these Regular
expressions and see what their groups catch.

Hope it helps you.
Flávio Cysne

2012/7/6 Niraj <niraj.khatmode@gmail.com>

> Someone please let me know how i can avoid %2 which i am getting in
> response using  \?RelayState=\w+&SAMLart=\w+%2B\w{12}(.+)%3D  this Reg ex
>
> On Fri, Jul 6, 2012 at 12:57 PM, Niraj <niraj.khatmode@gmail.com> wrote:
>
> > Thanks a lot.
> >
> > But now i have a problem.
> >
> > When my response is this
> > : AAQAALMcsRYkKm5hGFT%2BnegwZpYrTeF8k7BSD4vMpNvg4KGEE7bUkwpUAMo%3D
> > Extracted value: k7BSD4vMpNvg4KGEE7bUkwpUAM
> > This works every time
> >
> > But when my response is this
> > :AAQAALMcsRYkKm5hGFT%2BnegwZpYrTeF87bx%2FpCgyzpctt12b68RupAkJAMk%3D
> > I get extracted value from regular expression is
> > :7bx%2FpCgyzpctt12b68RupAkJAMk
> >
> > %2 which i am getting in extracted response is not required. So how i
> > can avoid that using same regular expression which will work both
> > the responses.
> >
> >
> > On Thu, Jul 5, 2012 at 9:36 PM, Flavio Cysne <flaviocysne@gmail.com
> >wrote:
> >
> >> Use this instead of my previous suggestion
> >>
> >> \?RelayState=\w+&SAMLart=\w+%2B\w{12}(.+)%3D
> >>
> >> previous one was using %2 when the correct is %2B
> >>
> >> 2012/7/5 Flavio Cysne <flaviocysne@gmail.com>
> >>
> >> > \?RelayState=\w+&SAMLart=\w+%2\w{13}(.+)%3D
> >> >
> >> >
> >> > 2012/7/5 Niraj <niraj.khatmode@gmail.com>
> >> >
> >> >> One more help please
> >> >>
> >> >>
> >> >>
> >>
> https://abcdtest/sp/ACS.saml2?RelayState=MvQd3EQccLtVfhFDLyHwEQLbTLVz7Y&SAMLart=AAQAALMcsRYkKm5hGFT%2BnegwZpYrTeF8
> >> >> zbaK6zuRrOnIE%2FelyfyHAWRBAMk%3D<
> >>
> https://abcdtest/sp/ACS.saml2?RelayState=MvQd3EQccLtVfhFDLyHwEQLbTLVz7Y&SAMLart=AAQAALMcsRYkKm5hGFT%2BnegwZpYrTeF8zbaK6zuRrOnIE%2FelyfyHAWRBAMk%3D
> >> >
> >> >>
> >> >> Now i want to extract zbaK6zuRrOnIE%2FelyfyHAWRBAMk
> >> >>
> >> >> Thanks,
> >> >> Niraj
> >> >>
> >> >> On Thu, Jul 5, 2012 at 5:57 PM, Shay Ginsbourg <sginsbourg@gmail.com
> >
> >> >> wrote:
> >> >>
> >> >> > GREAT!
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Thu, Jul 5, 2012 at 3:09 PM, Niraj <niraj.khatmode@gmail.com>
> >> wrote:
> >> >> >
> >> >> > > Hey Shay,
> >> >> > >
> >> >> > > It works. thanks a a lot.
> >> >> > >
> >> >> > > Thanks,
> >> >> > > Niraj
> >> >> > >
> >> >> > > On Thu, Jul 5, 2012 at 5:19 PM, Shay Ginsbourg <
> >> sginsbourg@gmail.com>
> >> >> > > wrote:
> >> >> > >
> >> >> > > > resumePath.+?%2F.+?%2F(.+)%2F.+?%2F.+?%2F.+?ping
> >> >> > > >
> >> >> > > >
> >> >> > > >
> >> >> > > >
> >> >> > > >
> >> >> > > > On Thu, Jul 5, 2012 at 2:38 PM, Niraj <
> niraj.khatmode@gmail.com>
> >> >> > wrote:
> >> >> > > >
> >> >> > > > > Hello All,
> >> >> > > > >
> >> >> > > > >
> >> >> > > > >
> >> >> > > >
> >> >> > >
> >> >> >
> >> >>
> >>
> https://abcd.test.com/autho/fed/external/idpredirect.html?resumePath=%2Fidp%2FQ3kZL%2FresumeSAML20%2Fidp%2FSSO.ping
> >> >> > > > >
> >> >> > > > > I want to extract Q3kZL from the above request.
Can someone
> >> please
> >> >> > give
> >> >> > > > me
> >> >> > > > > regular expression which i can use in Jmteter.
> >> >> > > > >
> >> >> > > > > Thanks,
> >> >> > > > > Niraj
> >> >> > > > >
> >> >> > > >
> >> >> > > >
> >> >> > > >
> >> >> > > > --
> >> >> > > >
> >> >> > > >  Regards,
> >> >> > > >
> >> >> > > >
> >> >> > > > Shay Ginsbourg
> >> >> > > >
> >> >> > > > Regulatory & Testing Affairs Consultant
> >> >> > > >
> >> >> > > >
> >> >> > > > WWW.GINSBOURG.COM
> >> >> > > >
> >> >> > > >
> >> >> > > > Providing Regulatory, Medical & Performance Testing
services
> >> since
> >> >> > 2008:
> >> >> > > >
> >> >> > > >
> >> >> > > > * IEC 62304 Medical Device Software Life Cycle
> >> >> > > >
> >> >> > > > * IEEE 829 Software Test Documentation
> >> >> > > >
> >> >> > > > * ISO 14971 Medical Device Risk Management
> >> >> > > >
> >> >> > > > * FDA 21 CFR Part 11 Software Validation
> >> >> > > >
> >> >> > > > * IEC 60601-1:2005 3rd ED PEMS - Medical Electrical
Equipment
> >> >> > > >
> >> >> > > > * End-to-end verification, validation, and testing (VV&T)
> >> >> > > >
> >> >> > > > * FDA and CE submissions
> >> >> > > >
> >> >> > > > * Open source free testing tools implementation
> >> >> > > >
> >> >> > > > * Functionality and regression testing
> >> >> > > >
> >> >> > > > * Software Performance & Load testing
> >> >> > > >
> >> >> > > > * Software Testing Advanced Automation
> >> >> > > >
> >> >> > > > * Medical Software Verification & Validation
> >> >> > > >
> >> >> > > > * Medical Device Verification & Validation
> >> >> > > >
> >> >> > > > * Medical Device Regulatory Submission
> >> >> > > >
> >> >> > > > * Organizational Regulatory Qualification
> >> >> > > >
> >> >> > > >
> >> >> > > > Formerly QA Manager of LoadRunner at Mercury Interactive
> >> >> > > >
> >> >> > > >
> >> >> > > > M.Sc. cum laude in Bio-Medical Engineering
> >> >> > > >
> >> >> > > > M.Sc. in Mechanical Engineering
> >> >> > > >
> >> >> > > >
> >> >> > > > Work:   +972(0)3-5185873
> >> >> > > >
> >> >> > > > Mobile:  +972(0)54-6690915
> >> >> > > >
> >> >> > > >
> >> >> > > > Email: sginsbourg@gmail.com
> >> >> > > >
> >> >> > > >
> >> >> > > > Visit my personal page on LinkedIn at:
> >> >> > > > http://www.linkedin.com/in/shayginsbourg
> >> >> > > >
> >> >> > > >
> >> >> > > > Please consider your environmental responsibility before
> printing
> >> >> this
> >> >> > > > e-mail.
> >> >> > > >
> >> >> > >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> >
> >> >> >  Regards,
> >> >> >
> >> >> >
> >> >> > Shay Ginsbourg
> >> >> >
> >> >> > Regulatory & Testing Affairs Consultant
> >> >> >
> >> >> >
> >> >> > WWW.GINSBOURG.COM
> >> >> >
> >> >> >
> >> >> > Providing Regulatory, Medical & Performance Testing services
since
> >> 2008:
> >> >> >
> >> >> >
> >> >> > * IEC 62304 Medical Device Software Life Cycle
> >> >> >
> >> >> > * IEEE 829 Software Test Documentation
> >> >> >
> >> >> > * ISO 14971 Medical Device Risk Management
> >> >> >
> >> >> > * FDA 21 CFR Part 11 Software Validation
> >> >> >
> >> >> > * IEC 60601-1:2005 3rd ED PEMS - Medical Electrical Equipment
> >> >> >
> >> >> > * End-to-end verification, validation, and testing (VV&T)
> >> >> >
> >> >> > * FDA and CE submissions
> >> >> >
> >> >> > * Open source free testing tools implementation
> >> >> >
> >> >> > * Functionality and regression testing
> >> >> >
> >> >> > * Software Performance & Load testing
> >> >> >
> >> >> > * Software Testing Advanced Automation
> >> >> >
> >> >> > * Medical Software Verification & Validation
> >> >> >
> >> >> > * Medical Device Verification & Validation
> >> >> >
> >> >> > * Medical Device Regulatory Submission
> >> >> >
> >> >> > * Organizational Regulatory Qualification
> >> >> >
> >> >> >
> >> >> > Formerly QA Manager of LoadRunner at Mercury Interactive
> >> >> >
> >> >> >
> >> >> > M.Sc. cum laude in Bio-Medical Engineering
> >> >> >
> >> >> > M.Sc. in Mechanical Engineering
> >> >> >
> >> >> >
> >> >> > Work:   +972(0)3-5185873
> >> >> >
> >> >> > Mobile:  +972(0)54-6690915
> >> >> >
> >> >> >
> >> >> > Email: sginsbourg@gmail.com
> >> >> >
> >> >> >
> >> >> > Visit my personal page on LinkedIn at:
> >> >> > http://www.linkedin.com/in/shayginsbourg
> >> >> >
> >> >> >
> >> >> > Please consider your environmental responsibility before printing
> >> this
> >> >> > e-mail.
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message