I’m struggling to figure out how to split a text for every 3 occurrences of the “|” character. Here is my input:
123 | name1 | description | $ 2.980,00 | 234 | name2 | description | $ 2.980,00 | 345 | name3 | description | $ 2.980,00
This would be my desired output:
var array[0] = "123 | name1 | description | $ 2.980,00"
var array[1] = "234 | name2 | description | $ 2.980,00"
...
I would do it this way (as Keng mentioned, it’s called tokenizing):