I want to extract from a String formatted information.
Let’s say I have these parameters that I want to fill from my String.
String apperanceNumber;
String docNumber;
String organisation;
String publishedDate;
String closingDate;
String amdendmentNumber;
String noticeTitle;
And that I want to get information from that kind of string:
1
12-0017
Transportation - Construction / Transports - Construction
2012/01/26
2012/02/13 11:00
PAVING - ROUTE 425 DUNNETS ROAD AREA TOWARD SCHENKELS LANE
2
0622028
DSS, CIMS
2012/01/25
2012/02/13 13:30
Computer forensic tools
I looked into String methods available, and I am pretty sure it is not the good way to to it.
You could try using regular expressions. Here’s a tutorial on that:
http://docs.oracle.com/javase/tutorial/essential/regex/
With regular expressions, you can read a whole document and identify where does a string belong based on how it is written.
Hope it helps!