How to split a string using regex without the number of resulting column being known beforehand?

Hi guys,

Maybe this is something trivial but I cannot find the easy way to do it. I'm trying to split a string in columns using a defined regex, where the number of resulting column is not defined beforehand. For example I want to split a string containing 250 hyphens “-” into 250 columns containing the content of string at both ends of the hyphens. If I use the Regex split node, I have to determine beforehand the number of resulting columns, setting that number through the use of capturing parenthesis.

Obviously I can use an iterative construct in order to achieve the desired results but I want to know if is there a simpler way or a specific node in order to do that.

Any hint?



If it's just to split by a hyphen, you can use the cell splitter node which doesn't require you to specify the number of columns. 

If it's more complex than just a hyphen for a split, you can use string replacer with your regex expression to capture the defining group you want to split by and in the replace box, use a unique string to you, I.e. Gcincillasplit. 

Then use the cell splitter node and split by Gcincillasplit.


Very nice information from Simon Thanks for share with other.

Wonderful, that is exactly what I was looking for! I wasn't aware of that node. Thank you very much Simon!