I want to be able to count how many times a word/phrase exists in a string.
I am trying:
let counter = htmlString.components(separatedBy:"href=\"/user/")
But it is giving me 11 when there is just 10 on the page.
I am getting them from here via the source code. I am not using the .json way as I need to get the avatar urls etc.
https://www.reddit.com/r/pics/about/moderators