I would like to split a string into less then 500 characters chunks and put it into an array. This is easily solved. 

My problem is that the string contains html code and the split should happen outside of the < > brackets. Anyone knows how to do it?

That's what I currently got.

```
while article.length > 0 do
  textarr << article[0, 499]
  article[0, 499] = ""
end

```

Can someone tell me how to check that the split does not cut into the html code?
Thanks