jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Regular Expression Extractor: Extracta from Multiline response of a TCP sample
Date Fri, 25 Apr 2014 21:57:09 GMT
On 25 April 2014 20:51, sdeuvarow <sdeuvarow@gmail.com> wrote:
> Hi, I have a TCP response in HL7 format:
>
> MSH|^~\&|MESA_XREF|XYZ_HOSPITAL|NIST_SENDER|NIST|.....||RSP^K23^RSP_K23|.....|P|2.5
> MSA|*AE*|NIST-101101161157166
> ERR||QPD^1^3^1^1|204^Unknown Key Identifier|E
> QAK|....|AE
> QPD|IHEPIXQuery|...|...|....
>
> I want to extract the content displayed in bold as 'AE'.
> I'm using the following configuration of the regular expression extractor,
> but it doesn't work.
>
> RegExp: ^MSA\|(\S+)\|

That's because ^ only matches at the start of the string by default.

Try

(?m)^MSA\|(\S+?)\|

or perhaps

(?m)^MSA\|([^\|]+)\|

http://jmeter.apache.org/usermanual/regular_expressions.html#line_mode

> Template:  $1$
> Match: 1
>
> What is wrong? I test the regExp and it works in other engines.
>
> Thanks!
>
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Regular-Expression-Extractor-Extracta-from-Multiline-response-of-a-TCP-sample-tp5719895.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

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


Mime
View raw message