title: Regex - only allow a space or nothing after a match
body: <p>Hi I'm nearly new with this of Regex... so, maybe my problem it's easy but I can't find a solution!</p>
  
  <p>I'm writing a regex pattern that looks into the user's writing and paint with another color the matches that is founded.
  I want for example to paint with another color, if the user write something like this:</p>
  
  <pre><code>foo()
  </code></pre>
  
  <p>the thing is that I DON'T want to paint that if the user writes something else after that, I mean if the user write only</p>
  
  <pre><code>"foo()" (or "foo() ")
  </code></pre>
  
  <p>then it's fine, I want to paint it, but if the user write</p>
  
  <pre><code>"foo()d" 
  </code></pre>
  
  <p>I don't want to paint that because is now well written for me. </p>
  
  <p>I already wrote the regex pattern that match the "foo()" (or also with a dot in the middle, like "foo.foo()"), but I´m facing with that problem. 
  I need to add something to my pattern that allow only a space, or nothing (if the user write something else after the ")" I don't want to match it.)
  This is my pattern:</p>
  
  <pre><code>[a-z]*\.?[a-z]*\(("[^"\r\n]*"|[-]?\b\d+[\.]?\d*\b)?\)
  </code></pre>
  
  <p>Thank you very much!</p>