I currently have an array being created like this
let stringSeparator1 = "some string"
if let contentArray = dataString?.components(separatedBy: stringSeparator1) {
if contentArray.count > 1 {
//Separate contentArray into array of relevant results
let stringSeparator2 = "</p>"
let result = contentArray[1].components(separatedBy: stringSeparator2)
This works great for 1 index position of contentArray. But what I really want to do is go through contentArray from index 1 to contentArray.count and delimit all of the data by stringSeparator2. I've tried several methods using loops and can't find a way that gives me what I need.