-3
public class newsidlink{
    public static void main (String[] args) throws Exception{

       String msg="ABCD NEWSBULLETIN01 Issued at HHSSIST NT=2147IST 28Oct2012  Name";
       //to do code 
    }
}

Hi I am a beginner in java.... please help me how to get the required parameters from the above string? I am interested in NEWSBULLETIN01 and Converstion of NewsTime NT into SQL native format?

Please suggest me?

Paulius Matulionis
  • 23,085
  • 22
  • 103
  • 143
  • {@Chris}I tried with sub string, split methods to get the data... i am interested to get the data by the use of regular expression or pattern matching... – Karthik Kolla Nov 01 '12 at 10:59

1 Answers1

0

use substring(). read about it here

   String msg="ABCD NEWSBULLETIN01 Issued at HHSSIST NT=2147IST 28Oct2012  Name";
           //to do code 
    System.out.pritnln(msg.subString(5,19));

by using String.split();

String[] arr = msg.split("\\s");

System.out.println(arr[1]);
PermGenError
  • 45,977
  • 8
  • 87
  • 106