title: Java find and replace text
body: <p>Hi i'm working on an android app and this is my problem</p>
  
  <p>I have a text file that is maybe 100 lines long it differs from phone to phone but lets say a section is like this</p>
  
  <pre><code>line 1 = 34
  line 2 = 94
  line 3 = 65
  line 4 = 82
  line 5 = 29
  etc
  </code></pre>
  
  <p>each line will be equal to  some number however that number will be different from phone since my application will be changing this number and it may already be different before my app is installed. So here's my problem i want to search the text file for say "line 3 = " then delete that entire line and replace it with "line 3 = some number"</p>
  
  <p>My main goal is to change that number at the end of line 3 and keep line 3 that is the text exactly the same i only want to edit the number however the problem is that number will always be different</p>
  
  <p>How can i go about doing this? thanks for any help</p>