title: Regular Expression: Simple Syntax Highlighting (Python)
body: <p>I have been struggling with creating a regular expression that will differentiate between an object definition and calling that object in Python. The purpose is syntax highlighting.</p>
  
  <p>This is the situation which needs to be resolved: (numbers denote line)</p>
  
  <pre><code>0    def otherfunc(vars...):
  1        pass
  2
  3    otherfunc(vars...)
  </code></pre>
  
  <p>I am interested in matching the name of the object, but not if preceded anywhere by def in the same line. The result on the above code should be:</p>
  
  <p>"otherfunc", line: 3</p>
  
  <p>Is regular expressions capable of doing something like this?</p>
  
  <p>EDIT: I am only concerned with scanning/searching a single line at a time.</p>