match few charcaters in a word
<p>I have sentences like:</p>

<pre><code>Slno:0 ahdhajdhjahdjahjdhahd &lt;&gt;
Slno:1 ahdhajdhjahdjahjdhahd &lt;&gt;
Slno:2 ahdhajdhjahdjahjdhahd &lt;&gt;
</code></pre>

<p>I want to compare with the first 5 charters as "Slno:x" where x is a integer.
if that condition is met I want to print the rest of the lines. and the remove the last &lt;>
so the output looks like:</p>

<pre><code>       ahdhajdhjahdjahjdhahd
       ahdhajdhjahdjahjdhahd
       ahdhajdhjahdjahjdhahd
</code></pre>

<p>I tried doing:</p>

<p>if string1.charAt(1)=='S' for all charcaters and than printed from string1[5] to end.
 if that conditions are true. Looking for a more better logic</p>
