I would ask you the same question
whats advantage in this case
/[\d\s]/;
meaning doesnt change outside of cc | [reply] [d/l] |
Of course it's different.
[\d\s] # matches a single char - digit or whitespace
\d\s # matches two chars - a digit then whitespace
| [reply] [d/l] |
[\d]
\d
| [reply] [d/l] |
Because one can use \d and \s to build larger character classes. A dot already matches everything but a single character.
What's the point of having such a character inside a character class? All you can do is build 4 different character classes: /[.]/, /[.\n]/, /[^.]/, /[^.\n]/. But they can all be written in a simple, different way:
/./, /(?s:.)/, /\n/, and /(*FAIL)/
So, once again, what would be the advantage of having dot inside a character class mean the same thing as outside of it?
| [reply] [d/l] [select] |
| [reply] |