Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
You want to remove everything that is not the "pure" URL? Pretty doable, if you group and remove the initial
/https?:\/\//
, plus the final part after the question mark.I loved this kata. I took a lot of time to solve this one, but it was worth it. My code is ugly though. I'll take some time to simplify and refactor it later.
Is it possible to use just a single regular expression to:
http
,https
, etc.I spent a lot of time trying to solve this, testing my regex at regex101.com but I can't effectively discriminate between TLDs and file extensions. Has anyone been able to complete the kata using a single regular expression?
I can't believe this issue was reported a year ago and the problem definition is still the same.
This comment is hidden because it contains spoiler information about the solution
Don't you just love how Python does most of the work for you? ^_^
This comment is hidden because it contains spoiler information about the solution
All integers between -1 and 0 inclusive of -1 and 0 are: [-1, 0]
sum(-1, 0) = -1 + 0 = -1