Hi Sebb, thanks for your response. Both of your reg. expressions didn't work. We are using this:
MSA\|([^\|]+)\| It isn't as precise as we would expect, but it will work most of the times. "No olvides, no traiciones, lo que llevas bien dentro de ti. No olvides, no traiciones, lo que siempre te ha hecho vivir." On Fri, Apr 25, 2014 at 6:57 PM, sebb <[email protected]> wrote: > 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] > >
