I'm trying to remove all the characters of a string AFTER a character appears 4 times, in this case the fourth appearance of character "/".
So if I have a string like this:
https://www.imbd.com/zenithasianfancyfood/posts
I want to get something like:
https://www.imbd.com/zenithasianfancyfood/