You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by zillakilla <zi...@sogetthis.com> on 2011/05/09 18:29:56 UTC

Re: Regular expression extractor using escape character '\'

Your regEx 1 works like this:
<meta http-equiv="refresh" content="5;
url=http://qa-2sc-usc\.2tor\.com/course/view\.php\?id=94&amp;modid=(\d*)&amp;modtype=assignment"
/>

Your regEx 2 works like this:
&lt;!\[CDATA\[
location\.replace\('http://qa-2sc-usc\.2tor\.com/course/view\.php\?id=94&amp;modid=(\d*)&amp;modtype=assignment'\);
//\]\]&gt;


however, why not just use?:
modid=(\d*)


Zilla

--
View this message in context: http://jmeter.512774.n5.nabble.com/Regular-expression-extractor-using-escape-character-tp4382219p4382286.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Regular expression extractor using escape character '\'

Posted by zillakilla <zi...@sogetthis.com>.
For regEx 2 could you use?:
<meta http-equiv="refresh" content="5;
url=http://qa-2sc-usc\.2tor\.com/course/view\.php\?id=94&amp;modid=(.+?)&


or even just:
modid=(.+?)&


(btw all the regExs tried work for me.... maybe your response data is
slightly different?... i.e modtype=assignment)

Zilla

--
View this message in context: http://jmeter.512774.n5.nabble.com/Regular-expression-extractor-using-escape-character-tp4382219p4384322.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Regular expression extractor using escape character '\'

Posted by vthakur <ma...@gmail.com>.
Thanks Zilla for your reply!
I have tried using modid=(\d*), but no luck for me.
Looks like response code is unique one i.e. it is not part of HTML body, so
within regular expression, I need to select 'Response field to check' =
'Body(unescaped)' etc. It works for one of my similar script but not for
this as here extra character '&' exists.

Reg#1: <meta http-equiv="refresh" content="5;
url=http://qa-2sc-usc\.2tor\.com/mod/resource/view\.php\?id=(.+?)" />   
----- Works Fine

Reg#2: <meta http-equiv="refresh" content="5;
url=http://qa-2sc-usc\.2tor\.com/course/view\.php\?id=94&amp;modid=(.+?)&amp;modtype=assignment"
/>   ----- Problematic

Reg#1 works for me but Reg#2 still giving me problem.
- Vinay

--
View this message in context: http://jmeter.512774.n5.nabble.com/Regular-expression-extractor-using-escape-character-tp4382219p4384219.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org