title: Multiple condition in Regex
body: <p>I want to replace my variable name in text file using regular expression with following condition :
  let's take example that I want to replace <code>log</code> with <code>LOG</code></p>
  
  <ol>
  <li>If the line starts with <code>import</code> then I don't want to replace it. like <code>import com.test.log.myfile;</code> distance between import and log can be max up to 1000 &rarr; I don't want to replace here</li>
  <li>If it is contained within double quotes such as "log" then I don't want to replace it.</li>
  <li><p>Other than above 2 condition, I want to change it everywhere like this:</p>
  
  <pre><code>log="log" ; // should be LOG="log";
  log.test(); // should be LOG.test();
  </code></pre></li>
  </ol>
  
  <p>I used below regular expression but it fulfilling my second and third condition but not first one:
  <a href="https://regex101.com/r/EDKyKZ/6" rel="nofollow noreferrer">Link</a> </p>
  
  <pre><code>(\blog\b)(?=(?:[^\"]|[\"][^\"]*[\"])*$)
  </code></pre>
  
  <p>can someone please help me to how to proceed or fix it ?</p>