title: search a text file for some text if exists change text inside ""
body: <p>ok i was wondring what is the best way to attempt to read a whole text file for some text if it finds the text it changes the text inside the "" i know this can be done but i never really looked into this or had to do this before and im not sure how to approach it. this is the stuff im looking for.</p>
  
  <p>this is the sort of code i want to change</p>
  
  <pre><code>add_weapon( "b23r" );  
  </code></pre>
  
  <p>and it finds add_weapon ("replace whats in here....");</p>
  
  <p>because i have a program when i hit the check box i want to make it so if i copy over a pistol i can make it the start weapon but to do that i need to replace the b23r  with the new weapon name when i push the check box and hit copy weapons i want it to replace that name with the weapon copying over.</p>
  
  <p>so for example </p>
  
  <pre><code>if (zombie_colt == true ) 
  {
   add_weapon( "zombie_colt" );  
  }
  </code></pre>
  
  <p>something along those lines because i want it to only work for pistols i just dont know the best way to read tho a text file look for that find the quotes and change whats inside those </p>
  
  <p>i looked into regex but it really confuses me and was asking here to see if anyone knows of a better way of accomplishing this </p>
  
  <p>thanks in advance elfenliedtopfan5</p>