title: Get part of the response body using python
body: <p>I'm getting a response from a server:</p>
  
  <pre><code>B�
  QeyJhbGciOiJIUzI1NiJ9.Mzc1Mjk4MjUzNjA1.PFblnWR46sByMIZX2fmot9SB8CNYDwHyDOduIf29Gn8$04059f6f-sdfs-2df2-lj2k-ce310d7e3e8c"5ecf7534b4ccd20100d29378*�所
  </code></pre>
  
  <p>After I use encoding on the response:</p>
  
  <pre><code>response = r.text.encode('utf8')
  </code></pre>
  
  <p>I have this in my response variable: </p>
  
  <pre><code>b'B\xe2\x80\xba\x01\nQeyJhbGciOiJIUzI1NiJ9.Mzc1Mjk4MjUzNjA1.GKjZw55OvoNpH4vOw0jMSQoCYQ3mIn4b0Hq7Ye5S3wA\x12$04059f6f-sdfs-2df2-lj2k-ce310d7e3e8c"\x185ecf7534b4ccd20100d29378*\x06\x08\xc3\x80\xc2\xa4\xc3\x93\xe2\x82\xac\x01'
  </code></pre>
  
  <p>I'm struggling with getting this part <strong>04059f6f-sdfs-2df2-lj2k-ce310d7e3e8c</strong> using different ways like</p>
  
  <pre><code>result = re.search('\x12$(.*)\x18', response)
  print(result)
  </code></pre>
  
  <p>result = None.</p>
  
  <p>What I'm trying to achieve is to get <strong>04059f6f-sdfs-2df2-lj2k-ce310d7e3e8c</strong> as a text.</p>
  
  <p>Any ideas or recommendations?</p>
  
  <p>Edit: I've removed "**" characters from the response as it was an attempt to make necessary part bold. </p>