[ Degree:{ } School:{ St.Petersburg University } Field:{ Oriental studies } Session:{ 2009 - 2009} ][ Degree:{ GCP } School:{ Columbia Business School } Field:{ Global Account Management } Session:{ 2009 - 2009} ][ Degree:{ Diploma } School:{ INSEAD } Field:{ Business Administration } Session:{ 1997 - 2007} ][ Degree:{ } School:{ IMD - Business Programs } Field:{ } Session:{ 2010 - 2011} ]
I’d’ like to make it a table with columns:
Degree School Fileld Session
No data St.P Oriental studies 2009-2009
I do understand that regex should handle this easily, but I failed to write correct regex expression. Please help me with this task - I relly tried hard to solve it myself.
I don’t know much about regex and since this is a KNIME forum. I found a solution without using regex.
See column_split.knwf (74.8 KB) .
And yes you need some nodes, but it works
The cell splitter on ][ that @HansS suggested was key to breaking this up into the “records”. If you cell split with the “as list” option, you can then ungroup into rows. After that, if you want to use a regex, it can be applied to find the fields between { } marks.
As always, many ways to do it and it comes down to whatever way you find easier and works for you!
A quote I saw recently, that I cannot remember who said it, but it is so true… something along the lines of "You decide that regex is the answer to your problem… and then you have two problems… "