You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by gnr80 <na...@yahoo.com> on 2008/01/03 02:02:53 UTC

Regular Expression Extractor Issue

I am trying to extract following values from previous response and pass it to
subsequent requests using Reguluar Expression Extractor.  But it always
returns defualt value defined in the Extractor.

<pre>
img id=_menuShow onclick="_showMenu();clearForm(this)"
src="images/showmenu.gif" style="cursor:hand; display:none" alt="(.+?) Menu"
width="(.+?)" border=0

</pre>

It seems to be the problem with the above tag has bracket characters. If I
remove "<img id=_menuShow onclick="_showMenu();clearForm(this)" " then it
works fine. Are there any escape characters to tell Extractor not to
evaluate the above brackets.

Thanks,gnr80
-- 
View this message in context: http://www.nabble.com/Regular-Expression-Extractor-Issue-tp14589696p14589696.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 Issue

Posted by sebb <se...@gmail.com>.
http://jakarta.apache.org/oro/api/org/apache/oro/text/regex/package-summary.html

describes the pattern matching.

On 05/01/2008, gnr80 <na...@yahoo.com> wrote:
>
> It seems to be that had to escape those characters to get the right values.
> I'll try again without those characters to be escaped. I am sure that had to
> escape them otherwise got problem in getting extractor to work. The version
> was using for testing is 2.3.
> --
> View this message in context: http://www.nabble.com/Regular-Expression-Extractor-Issue-tp14589696p14635805.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
>
>

---------------------------------------------------------------------
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 Issue

Posted by gnr80 <na...@yahoo.com>.
It seems to be that had to escape those characters to get the right values.
I'll try again without those characters to be escaped. I am sure that had to
escape them otherwise got problem in getting extractor to work. The version
was using for testing is 2.3.
-- 
View this message in context: http://www.nabble.com/Regular-Expression-Extractor-Issue-tp14589696p14635805.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 Issue

Posted by sebb <se...@gmail.com>.
:%# do not need to be escaped.

However, . * + must be escaped.

^ and $ must be escaped unless at the start or end.

On 04/01/2008, gnr80 <na...@yahoo.com> wrote:
>
> This is good to know escape character is '\' . I am trying to find what are
> the characters to be escaped.
> During testing, came across the following fields to be escaped.
> ()[]:%#
> Thanks,gnr80
>
> --
> View this message in context: http://www.nabble.com/Regular-Expression-Extractor-Issue-tp14589696p14618024.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
>
>

---------------------------------------------------------------------
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 Issue

Posted by gnr80 <na...@yahoo.com>.
This is good to know escape character is '\' . I am trying to find what are
the characters to be escaped.
During testing, came across the following fields to be escaped.
()[]:%#
Thanks,gnr80

-- 
View this message in context: http://www.nabble.com/Regular-Expression-Extractor-Issue-tp14589696p14618024.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 Issue

Posted by sebb <se...@gmail.com>.
On 03/01/2008, gnr80 <na...@yahoo.com> wrote:
>
> I am trying to extract following values from previous response and pass it to
> subsequent requests using Reguluar Expression Extractor.  But it always
> returns defualt value defined in the Extractor.
>
> <pre>
> img id=_menuShow onclick="_showMenu();clearForm(this)"
> src="images/showmenu.gif" style="cursor:hand; display:none" alt="(.+?) Menu"
> width="(.+?)" border=0
>
> </pre>
>
> It seems to be the problem with the above tag has bracket characters. If I
> remove "<img id=_menuShow onclick="_showMenu();clearForm(this)" " then it
> works fine. Are there any escape characters to tell Extractor not to
> evaluate the above brackets.

Yes, the escape character is \ so you must use

_showMenu\(\);

rather than

_showMenu();

etc.

> Thanks,gnr80
> --
> View this message in context: http://www.nabble.com/Regular-Expression-Extractor-Issue-tp14589696p14589696.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
>
>

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