How to get username instagram from url Swift 4.2

I have a problem in my project where I have to get username instagram from url. I think it's easy to do it because there is google that always helps us haha :D. But after i searched it on google, I got one but you know I can't just copy the regex, you need to understand what's really going on about the code. So I finally success to get the username and I want to share with you guys. I just share the method not full class. Here we go...

If you have any questions, please feel free to ask.

Popular posts from this blog

How to get thumbnail from video URL in Swift 5

Missing system image Android Studio solution

How to customize your date according to Timezone in Swift 5