how to parse bank alert messages in android?
<p>how to parse bank alert messages in android?</p>

<p>I have parsed HDFC banks alert sms.
"thank you for using your HDFC bank Credit card ending 1364 for rs.7195.00 in MUMBAI at CLEARTRIP TRAVEL SERVI on 2012-02-24:11:10:50." thisis what.</p>

<p>But i have to parse all banks(SBI,ICICI,UNION,AXIS etc)</p>

<p>this is waht my code</p>

<pre><code>public Map&lt;String, String&gt; convert(String msg){
        HashMap&lt; String, String&gt; values =new HashMap&lt;String, String&gt;();
        Log.d(tag, "Inside Parsing");
        values.put("bank", msg.substring(msg.indexOf("your")+5,msg.indexOf(" bank")));
        values.put("dbcr",msg.substring(msg.indexOf("bank")+5,msg.indexOf(" card")));
        values.put("accno", msg.substring(msg.indexOf(" ending ")+8,msg.indexOf("for rs.")));
        values.put("time", msg.split("on")[1]);
        values.put("amount", msg.substring(msg.indexOf("rs.")+3,msg.indexOf(" in") ));
        values.put("category", msg.substring(msg.indexOf("at")+3,msg.indexOf(" on")));
        return values;
    }
</code></pre>

<p>give some other idea for parsing.
Thanks in advance.</p>
