title: notepad++ regex replace word in first line
body: <p>Im trying to use the following regex to search and replace in multiple files in notepad++</p>
  
  <pre><code>([^\n]*)(state="1")([^\n]*)*.
  </code></pre>
  
  <p>This searches and finds state="1" in the first line of each file and works fine.</p>
  
  <p>However, when I try to replace state="1" using:</p>
  
  <pre><code>Replace with: $1 state="5"
  </code></pre>
  
  <p>it cuts off the rest of the line.</p>
  
  <p>I thought that it might be possible to get the rest of the line using:</p>
  
  <pre><code>Replace with: $1 state="5" $2
  </code></pre>
  
  <p>However, $2 doesnt seem to exist as a variable.</p>
  
  <p>Is there some way to attach the rest of the line into variable $2?</p>
  
  <p>Cheers</p>
  
  <p>Heres an image to show how 
      (?=\A[^\n]*)state="1"
  is not working</p>
  
  <p>Ive updated my version of notepad++ and everything
  <img src="https://i.stack.imgur.com/DHSfS.png" alt="notworking"></p>