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 restart the app with flutter Android and iOS

How to have ConstraintLayout inside ScrollView and ScrollView inside ConstraintLayout Android

Missing system image Android Studio solution