I have a string data (in txt file format) like below. I need to extract this into an array. I am not good at RegEx. So need your help to identify the expression to use.
Input: is below:
TABLENAME {
Type: DEPT;
Items: [
0000=0000
0001=0001
0002=0002
0010=0010
0012=0012
0020=0020
];
}
Expected output: An Array with 2 elements
1. Type:DEPT
2. Items: [
0000=0000
0001=0001
0002=0002
0010=0010
0012=0012
0020=0020
];
The second element should also be converted to an array. Need to extract only the content bleow and I can then use a simple string.Split to extract the data I need.
0000=0000
0001=0001
0002=0002
0010=0010
0012=0012
0020=0020
Can someone pls help?