You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by amelaao <am...@gmail.com> on 2006/05/06 22:04:02 UTC

regex extractor

I'm testing a WS using SOAP-RPC Request. I'm extracting part of the WS
Response message using RegEx Extractor Post Processor. However, sometimes
response message contains newline characters that mess up the RegEx
extractor and it can't find the match.
I would like to replace newline with "", and I played with Javascript
replace function but couldn't get it to work. Any ideas?

--
Regards,
Amela

Re: regex extractor

Posted by amelaao <am...@gmail.com>.
Thanks. I didn't realize you have to have parenthesis around ?s.

Amela


On 5/7/06, sebb <se...@gmail.com> wrote:
>
> On 06/05/06, amelaao <am...@gmail.com> wrote:
> > I'm testing a WS using SOAP-RPC Request. I'm extracting part of the WS
> > Response message using RegEx Extractor Post Processor. However,
> sometimes
> > response message contains newline characters that mess up the RegEx
> > extractor and it can't find the match.
> > I would like to replace newline with "", and I played with Javascript
> > replace function but couldn't get it to work. Any ideas?
>
> I would not do that - better to fix the regex so that it matches new-line.
>
> Note that "\s" will match new-line, but "." does not, unless you
> change to single-line mode.
>
> Do this by prefixing the RE with (?s).
>
> This is explained on the Response Assertion page.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


--
Regards,
Amela

Re: regex extractor

Posted by sebb <se...@gmail.com>.
On 06/05/06, amelaao <am...@gmail.com> wrote:
> I'm testing a WS using SOAP-RPC Request. I'm extracting part of the WS
> Response message using RegEx Extractor Post Processor. However, sometimes
> response message contains newline characters that mess up the RegEx
> extractor and it can't find the match.
> I would like to replace newline with "", and I played with Javascript
> replace function but couldn't get it to work. Any ideas?

I would not do that - better to fix the regex so that it matches new-line.

Note that "\s" will match new-line, but "." does not, unless you
change to single-line mode.

Do this by prefixing the RE with (?s).

This is explained on the Response Assertion page.

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