title: One Regular Expression
body: <p>My question is very simple.Can someone explain this python Regular Expression for me?</p>
  
  <p><code>neg_pattern = re.compile(r'\b(' + '|'.join(negations_dic.keys()) + r')\b')</code></p>
  
  <p>And the negations_dic is here:</p>
  
  <p><code>negations_dic = {"isn't":"is not", "aren't":"are not", "wasn't":"was not", "weren't":"were not"}</code> </p>
  
  <p>I want to know what do the ( and ) and '|' mean .</p>
  
  <p>This is the command that use the regular expression above:</p>
  
  <p><code>neg_handled = neg_pattern.sub(lambda x: negations_dic[x.group()], lower_case)</code>  </p>
  
  <p>And what is the use of <code>x.group</code> mean? Does it return the key-value pair in the <code>negation_dic</code>?</p>