Skip to content

Commit bfba392

Browse files
committed
fix
1 parent 0e212f1 commit bfba392

File tree

1 file changed

+2
-2
lines changed
  • 9-regular-expressions/02-regexp-character-classes

1 file changed

+2
-2
lines changed

9-regular-expressions/02-regexp-character-classes/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ Luckily, there's an alternative, that works everywhere. We can use a regexp like
153153
alert( "A\nB".match(/A[\s\S]B/) ); // A\nB (match!)
154154
```
155155
156-
The pattern `pattern:[\s\S]` literally says: "a space character OR not a space character". In other words, "anything".
156+
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.
157157
158-
This works everywhere. Also we can use it if we don't want to use `pattern:s` flag, in cases when we want a regular "no-newline" dot too in the pattern.
158+
This trick works everywhere. Also we can use it if we don't want to use `pattern:s` flag, in cases when we want a regular "no-newline" dot too in the pattern.
159159
````
160160

161161
````warn header="Pay attention to spaces"

0 commit comments

Comments
 (0)