does or(|) always go left to right with "g" ? (bc www.|\..+ doesn't touch the domain that also starts with a dot)
Why did more than 70 people write this code and import meaningless itertools?
Thanks for showing me you can multiply arrays like that
Hey! nadolski's explenation is much better than I could give at the moment as I'm new to regex and this one is partially taken from stack overflow and partialy changed by me!
It's so excited! :)
There are two ways to write Python code: like this and like me.
Good solution, but it must be like this: /.+//|www\.|..+/g ("\" after "www"). Because the URL "http://www4cnet.com" will reutrn 'cnet' instead of 'www4cnet'.
elegant and clean
Hey, it's called spread operator. For more information about it check this:
It puts each character of s in a new array
if s = 'abc'
then [...s] = ['a','b','c']
I like this solution most. Simple and easy to read.
The moment i saw the question i understood i had to use regex but i am not good at it, probably scared of the syntax. But this looks good and i will definitely check the solution.
What the hell does that "..." operator even do?!
I liked this one.