I have a String looking like this: 450ZVXX_OF_INV_CC 3
, which basically consists of three parts: Column 1 has 3 digits (in this case the numbers 450), Column 2 has 30 digits (in this case the digits and whitespaces until 3) and Column 3 has again 3 digits.
Now I need to split the String into the three parts using the digits 3, 30, 3 (stored in ints), because I have to build a table with above mentioned three columns.
So I basically want to take int1 = 3, get the first 3 digits of the String. Then I take int2 = 30, get the next 30 digits of the String. And then I take int3 = 3 to get the next 3 digits of the String.
FYI: The length digits 3, 30, 3 are the preset column length by the database system.
Regex is not useful, because I do not have any digits or characters, which I use to split the String. I will just use the preset numbers as explained above.
Programming Language: Java
Thanks in advance!