title: python regex ignoring text
body: <p>I have a list of imperfections in my code:
  the list contains the name of a procedure its parameters and the one parameter that I have to change adding 'CONST' in front of it</p>
  
  <p>I'd like to find all the procedures that matches the pattern
  name of the procedure (list of parameters plus comments all over the place)</p>
  
  <p>i.e.
  imperfection in the code    PROCEDURE TEST (X : STRING; Y: STRING); (Y NEEDS CONST)</p>
  
  <p>I'd like to find the procedure
      PROCEDURE TEST (X : STRING; {SOME COMMENTS HERE}  Y: STRING {SOME MORE COMMENTS HERE}); </p>
  
  <p>and then add the word CONST before Y: STRING to finally get</p>
  
  <pre><code>PROCEDURE TEST (X : STRING; {SOME COMMENTS HERE}  CONST Y: STRING {SOME COMMENTS HERE});
  </code></pre>
  
  <p>consider that we can have {SOME COMMENTS HERE} repeated ntimes in nplaces and in the final version I want to keep the comments</p>
  
  <p>I know there are other possibilities but I'd like to do that with regular expressions
  Is it possible?</p>