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.
Brackets are character classes. They match any single character between them--specific meta characters are interpretted differently. They allow ranges such as a-z for matching the english alphabet (lowercase), for example. They also support negation by placing ^ as the first character, ie, match anything BUT the following. You might want to play around here: https://regexr.com/
This solution looks very clear and excellent to me!
May I ask: Do the square brackets prevent any content from being interpreted as Regex escape chars?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Is there any particular reason to use strict (in)equality here?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You're right. \w is equivalent to [A-Za-z0-9_]
interesting~
It's just for fun, a personal challenge: see Code Golfing
why compress code like this?
This comment is hidden because it contains spoiler information about the solution
I think
i
(ignore case) isnt necessary in this caseI think it might be better using
===
or!==
.Loading more items...