On 25 April 2014 20:51, sdeuvarow <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
