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
) ?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)