擅长:python、mysql、java
<pre><code>my_string =' "sender" : "md-dgenie", "text" : "your dudegenie code is 6326. welcome to the world of dudegenie! your wish, my command!", "time" : "1439155575925", "name" : "John"'
import re
print dict(re.findall(r'"([^"]*)"\s*:\s*"([^"]*)"',my_string))
</code></pre>
<p>您可以通过使用<code>re.findall</code>查找<code>tuples</code>并将其传递给<code>dict</code>来实现</p>