find specific format/value from text file
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8802089/iwant-java-code-for-find-spicific-format-value-from-text-file">Iwant java code for find spicific format/value from text file</a>  </p>
</blockquote>



<p>I want java code to find specific format/value from text file.</p>

<p>My text file contains following text format:</p>

<p>~KL*1**20*1~NM1*PR*2*BLUE CROSS OF CONNECTICUT*<strong>**PI*00060
~KL*2*1*21*1~NM1*1P*1*TOM*MATHEW*</strong>*XX*2865321477
~KL*3*2*22*1~TRN*1*163610204*1352091203~NM1*IL*1*CRISS*DONALD
~KL*4*3*23*0~NM1*03*1*TOM*JACOB~DMG*D8*19700208~INS*N*34~HI*BK:4168*BF:2859*BF:25060~DTP*291*D8*20100506~EQ*5^32
~KL*5*2*22*0~TRN*1*163610204*1352091203~NM1*IL*1*CRISS*DONALD~DMG*D8*19600208~HI*BK:3572*BF:45981~DTP*291*D8*20100506~EQ*5^32~SE*24*324679238
So hear ~kL contains some values like*1**20*1 and other ~kL contains *2*1*21 and other ~kl ...so on.</p>

<p>Now I want code to find/output for all ~KL but that contains *22
example: ~KL*5*2*22*0</p>
