title: how to extract a particular value in a text file using regex and save the extracted one in another file?
body: <p>have a text file many values how to extract a particular part from it and arrange it in orderwise in another text file</p>
  
  <p>some part of text file :</p>
  
  <pre><code>{
  "number": "acd162",
  "password": "pass1425-*",
  "Type": "phone"
  
  }
  {
  "number": "bcd119",
  "password": "pass1234- ",
  "Type": "phone"
  
  }
  {
  "number": "abc123",
  "password": "pass0*++",
  "Type": "phone"
  
  {
  "number": "ahwc1286",
  "password": "pass*-+",
  "Type": "phone"
  
  }
  </code></pre>
  
  <p>output i need : </p>
  
  <p>need password column of all in another text file as </p>
  
  <pre><code>1="pass1425-"
  2="pass1234- "
  3="pass0*++"
  4="pass*-+"
  </code></pre>
  
  <p>tried this : </p>
  
  <pre><code>"password":.* "\w+" 
  </code></pre>
  
  <p>but couldn't figure out how should i extract them and give order wise value assign to them 1,2,3,4,5.....</p>