title: Greedy and non-greedy regex
body: <p>I currently have this regex: <code>this\.(.*)?\s[=,]\s</code>, however I have come across a pickle I cannot fix. </p>
  
  <p>I tried the following Regex, which works, but it captures the space as well which I don't want: <code>this\.(.*)?(?&lt;=\s)=|(?&lt;!\s),</code>. What I'm trying to do is match identifier names. An example of what I want and the result is this:</p>
  
  <p><code>this.""W = blah;</code> which would match <code>""W</code>. The  second regex above does this almost perfectly, however it also captures the space before the <code>=</code> in the first group. Can someone point me in the correct direction to fix this?</p>
  
  <p>EDIT: The reason for not simply using <code>[^\s]</code> in the wildcard group is that sometimes I can get lines like this: <code>this. "$ = blah;</code></p>
  
  <p>EDIT2: Now I have another issue. Its not matching lines like <code>param1.readBytes(this.=!3,0,param1.readInt());</code> properly. Instead of matching <code>=!3</code> its matching <code>=!3,0</code>. Is there a way to fix this? Again, I cannot simply use a <code>[^,]</code> because there could be a name like <code>param1.readBytes(this.,3$,0,param1.readInt());</code> which should match <code>,3$</code>.</p>