title: regular expression for "one token appears multiple times"
body: <p>From MSDN, seen from the explanation of "<a href="http://msdn.microsoft.com/en-us/library/aa314327%28v=vs.60%29.aspx" rel="nofollow">CString::Format</a>", </p>
  
  <p>The call will fail if the string object itself is offered as a parameter to Format. Following is an example:</p>
  
  <pre><code>CString str = "Some Data";
  str.Format("%s%d", str, 123);   // Attention: str is also used in the parameter list.
  </code></pre>
  
  <p>Now I want to check whether there are codes in my project went against this rule.</p>
  
  <p>I think regular expression can help me achieve this goal. (I mean the regular expression that is usually built in Editor's search/find file function, not the regular expression used in C#/C++/Java/Python etc)</p>
  
  <p>In short, the expression might look like this:</p>
  
  <pre><code>XXX.Format\(.*XXX.*\)
  </code></pre>
  
  <p>where the XXX can vary to be a valid variable name. E.g. "str", "sql_string", "_mystr"</p>
  
  <p>Note: I can download any editor like Notepad++, sublime text; I have visual studio. So it is quite ok if you can solve this issue on any editor.</p>