title: JMETER (Beanshell): Token Parsing Error: Lexical error at line 4, column 25. Encountered: "u" (117), after : "\'s"
body: <p>In JMETER I have HTTP query which returns JSON String as following:</p>
  
  <p><code>{"url":"/some/path?Id=343\u0026"}</code></p>
  
  <p>I'm trying to parse parameter Id from it with <code>BeanShell</code> sampler:</p>
  
  <pre><code>url = prev.getResponseDataAsString();
  int start=url.indexOf('Id=');
  int end = url.indexOf('u0026')-1;
  newId=url.substring(start,end);
  vars.put("newId", newId);
  </code></pre>
  
  <p>and get an error: <code>Token Parsing Error: Lexical error at line 4, column 25.  Encountered: "u" (117), after : "\'s"</code></p>
  
  <p>Any ideas?</p>
  
  <p>So it seems like backslash confuses the parser. Tried some Java <code>String</code> operations (<code>replaceAll</code>, <code>URLEncoder.encode</code>) - none of them seems to help.</p>