This is solution proposed for a challenge, and i can't understand why?

Are you asking about the \w or the *?

Update: I think you may be asking why the entire thing (\w*) is needed in the first place. I found a previous thread that explains it.

How do lookaheads work with other code?