title: notepad++ regular expressions to convert lines for SPSS syntax editor
body: <p>I am curently busy with bulding a synthax document in SPSS and have a column of variable strings that consists of approximately 40 lines (it will be much much more in coming week). SPSS has a nice way of creating it (can be seen here :) 
  <a href="http://vault.hanover.edu/~altermattw/methods/stats/reliable/reliability-1.html" rel="nofollow">http://vault.hanover.edu/~altermattw/methods/stats/reliable/reliability-1.html</a>) but it can be done per one variable at a time which is possible to automatize.</p>
  
  <p>I am a total beginner (I wouldn't mind if you would call me n00b) at search&amp;replace with reqular expressions in notepad++ but I can use the extended search function as a basic user :P</p>
  
  <p>The data contains scores Likert scale (from 1-7) and I would like to reverse it to do some tests. </p>
  
  <p>For example: my variable name on the line is <code>q_4_SQ001</code> and the sline in synthax editor is  <code>q_4_SQ001=COMPUTE q_4_SQ001r=8-q_4_SQ001.</code></p>
  
  <p>My question so far is thus:</p>
  
  <p>How can I convert a line containing a unique variable name into it's revers formula?</p>
  
  <p>So in this case, how can I replace the following lines: </p>
  
  <pre><code>q_4_SQ001
  q_4_SQ002
  q_4_SQ003
  q_4_SQ004
  </code></pre>
  
  <p>into the synthax given under:</p>
  
  <pre><code>COMPUTE q_4_SQ001r=8-q_4_SQ001.
  COMPUTE q_4_SQ002r=8-q_4_SQ002.
  COMPUTE q_4_SQ003r=8-q_4_SQ003.
  COMPUTE q_4_SQ004r=8-q_4_SQ004.
  </code></pre>
  
  <p>Please remark the dots in the end of each line  I did this manually to give you an impression of what I would like to achieve. My data set has different questions and different variable strings so I would like to make my life a bit easier right now :P</p>
  
  <p>I also tried recording and running a macro as stated in here (http://stackoverflow.com/questions/2467875/notepad-replace-all-regular-expression-start-of-the-line-and-end-of-the-line) but that still is pretty time consuming since I have to do each line manulally and clean up with extended search in the end.</p>
  
  <p>Wouldn't it be easier to convert each line?</p>
  
  <p>Thanks a bunch in advance :)</p>