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.
Avoid? No. Just use them with double backslash in RegExp constructor.
So, are you saying that we should avoid All the built-in character set such as
\d
,\w
,\s
, etc?\d
is not the only char set that have a backslash (escaped). How about other escaped characters that we can't construct manually such as word boundaries? (\b
&\B
) ?Agree, this does not make sense. How can this tag be removed?
Same for Javascript, but only if we use new RegExp(regString) constructor.
We must use \\d instead of \d. Or [0-9]. Or String.raw`\d`
Apparently it's advisable to not use /d if you can, since it may cause "escaping issues in some languages (like Java)."
(However much that's worth, just putting it out there)
Why this tagged as "Regular Expressions"?
(!?1) !== (?!1).
(!?1) mean "zero or one !" then "1". So regexp can be rewritten to /0*1/g
But this solutions works despite this mistake.
Still incorrect expected output for randomised test in JS version of kata sometimes when we have 0 koef in input.
For example,