title: RegEx Ignore a commented line.
body: <p>I am trying to parse the following text</p>
  
  <pre><code># ---------------------------------------------------------------------------- #
  # Packages
  # ---------------------------------------------------------------------------- #
  
  set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "file_1_test_1_qip.vhd"]
  set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "file_2_test_1_qip.vhd"]
  set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "file_3_test_1_qip.vhd"]
  
  # Register Tool set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "file_INVALID_test_1_qip.vhd"]
  
  # ---------------------------------------------------------------------------- #
  # Sub Modules
  # ---------------------------------------------------------------------------- #
  
  set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) "module_test_2.qip"]
  set_global_assignment -name QIP_FILE [file join $::quartus(qip_path) "module_test_3.qip"]
  
  # ---------------------------------------------------------------------------- #
  # Module Files
  # ---------------------------------------------------------------------------- #
  
  set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "file_4_test_1_qip.vhd"]
  set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "file_5_test_1_qip.vhd"]
  </code></pre>
  
  <p>Using the regex:</p>
  
  <pre><code>(?&lt;=_FILE).*"(.+)"
  </code></pre>
  
  <p>This also works fine and gives me all the file names in text above, however it also gives me the file names of lines which have been commented out. </p>
  
  <p>I've tried to make a RegEx which would ignore this however I cannot get it to work. </p>
  
  <p>This is what I've tried </p>
  
  <pre><code>(?&lt;!#)(?:(?&lt;=_FILE).+"(.+)")
  </code></pre>
  
  <p>Please take a look at the <a href="https://regex101.com/r/yT0eF0/4" rel="nofollow" title="RegEx 101">RegEx 101</a></p>
  
  <p>Regards
  Ephreal</p>