title: regex expression string dictionary python
body: <p>How can I make regular expressions work with dictionary?</p>
  
  <p>Example:</p>
  
  <pre><code>my_log:
  Received block blk_-967145856473901804 of size 67108864 from /10.250.6.191
  Received block blk_8408125361497769001 of size 67108864 from /10.251.70.211
  
  My dictionary:
  key_log = {"Received block (.*) of size ([-]?[0-9]+) from (.*)": 1}
  
  My code:
  for line in my_log:
          key_id = key_log[my_log]
          print (key_id)
  </code></pre>
  
  <p>My code is not working?</p>