3

Getting "UTR\|UTIBH0000000000\|"; in response in JMeter. Want to read \|UTIBH000000000\ from "UTR\|UTIBH0000000000\|"; I am able to read using (.+?) but the error comes: Token Parsing Error: Lexical error at line 3, column 88. Encountered: "|" (124), after : "\"UTR\"

Tried:

  1. "UTR(.)";
  2. "UTR[.]";
  3. "UTR.";
  4. "UTR(.+?)";

but no success.

Also tried tried similar question but no success.

Script:

${__log(${__eval("SUCC01"+"UserID:"+"${__P(FinacleUserID)}"+": Payment Order ID - "+"${SuccessPaymentID}"+"UTR No:-"+"${UTRNO}"+" Verified Successfully")},,,)}

Applying Regular Expression Extractor on: window.returnValue = "UTR\|UTIBH0000000000\|";

Regular Expression: window.returnValue = "UTR(.+?)"

  • Please show the code that gets the error. There's no `|` in the regex `(.+?)`. – Barmar Oct 17 '12 at 16:28
  • Script: ${__log(${__eval("SUCC01"+"UserID:"+"${__P(FinacleUserID)}"+": Payment Order ID - "+"${SuccessPaymentID}"+"UTR No:-"+"${UTRNO}"+" Verified Successfully")},,,)} Applying Regular Expression Extractor on: window.returnValue = "UTR\|UTIBH0000000000\|"; – Aditya Prakash Oct 17 '12 at 16:35
  • 2
    Please edit that into your question, it's unreadable in comments. – Barmar Oct 17 '12 at 16:36
  • May be this is the error is related to Token parsing , because the regular expression that i am using is able to extract the value. And after writing the value it shows error: Parsing Error: Lexical error at line .... – Aditya Prakash Oct 17 '12 at 17:14
  • I don't see any regular expression use in the script you posted. – Barmar Oct 17 '12 at 17:33
  • Uhm, are you sure "There's no | in the regex". I wonder why this pattern matches both "delete" and "insert": Pattern.compile("^(?i)(INSERT|DELETE\\s(.+?)\\s") – amphibient Oct 17 '12 at 17:39

1 Answers1

0

Try this regular expression:

UTR(\\[^\\]*\\)

enter image description here

Gábor Lipták
  • 9,646
  • 2
  • 59
  • 113