From 81e9f1779b236ba656940b5b29de891d7fb07e23 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Wed, 5 Feb 2020 10:51:47 +0000 Subject: [PATCH] minor fixes --- 9-regular-expressions/02-regexp-character-classes/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9-regular-expressions/02-regexp-character-classes/article.md b/9-regular-expressions/02-regexp-character-classes/article.md index 9396c3e1..dbf93287 100644 --- a/9-regular-expressions/02-regexp-character-classes/article.md +++ b/9-regular-expressions/02-regexp-character-classes/article.md @@ -155,7 +155,7 @@ alert( "A\nB".match(/A[\s\S]B/) ); // A\nB (match!) The pattern `pattern:[\s\S]` literally says: "a space character OR not a space character". In other words, "anything". We could use another pair of complementary classes, such as `pattern:[\d\D]`, that doesn't matter. Or even the `pattern:[^]` -- as it means match any character except nothing. -This trick works everywhere. Also we can use it if we don't want to set `pattern:s` flag (or it's not supported), in cases when we want a regular "no-newline" dot too in the pattern. +Also we can use this trick if we want both kind of "dots" in the same pattern: the actual dot `pattern:.` behaving the regular way ("not including a newline"), and also a way to match "any character" with `pattern:[\s\S]` or alike. ```` ````warn header="Pay attention to spaces"