title: How to determine if a string is escaped unicode
body: <p>How do you determine if a string contains escaped unicode so you know whether or not to run <code>.decode("unicode-escape")</code>?</p>
  
  <p>For example:</p>
  
  <p><strong>test.py</strong></p>
  
  <pre><code># -*- coding: utf-8 -*-
  str_escaped = '"A\u0026B"'
  str_unicode = '"Война́ и миръ"'
  
  arr_all_strings = [str_escaped, str_unicode]
  
  def is_escaped_unicode(str):
      #how do I determine if this is escaped unicode?
      pass
  
  for str in arr_all_strings:
      if is_escaped_unicode(str):
          str = str.decode("unicode-escape")
      print str
  </code></pre>
  
  <p><strong>Current output:</strong></p>
  
  <pre><code>"A\u0026B"
  "Война́ и миръ"
  </code></pre>
  
  <p><strong>Expected output:</strong></p>
  
  <pre><code>"A&amp;B"
  "Война́ и миръ"
  </code></pre>
  
  <p>How do I define <code>is_escaped_unicode(str)</code> to determine if the string that's passed is actually escaped unicode?</p>