diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 4822fdb4..1d2997e0 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -12,7 +12,7 @@ Scripts are provided and executed as plain text. They don't need special prepara In this aspect, JavaScript is very different from another language called [Java](https://en.wikipedia.org/wiki/Java_(programming_language)). -```smart header="Why JavaScript?" +```smart header="Why is it called JavaScript?" When JavaScript was created, it initially had another name: "LiveScript". But Java was very popular at that time, so it was decided that positioning a new language as a "younger brother" of Java would help. But as it evolved, JavaScript became a fully independent language with its own specification called [ECMAScript](http://en.wikipedia.org/wiki/ECMAScript), and now it has no relation to Java at all. diff --git a/9-regular-expressions/02-regexp-character-classes/article.md b/9-regular-expressions/02-regexp-character-classes/article.md index b13272db..baf9a50e 100644 --- a/9-regular-expressions/02-regexp-character-classes/article.md +++ b/9-regular-expressions/02-regexp-character-classes/article.md @@ -144,6 +144,17 @@ That's what flag `pattern:s` does. If a regexp has it, then a dot `pattern:.` ma alert( "A\nB".match(/A.B/s) ); // A\nB (match!) ``` +````warn header="Not supported in Firefox, IE, Edge" +Check for the most recent state of support. + +Luckily, there's an alternative. We can use a regexp like `pattern:[\s\S]` to match "any character". + +```js run +alert( "A\nB".match(/A[\s\S]B/) ); // A\nB (match!) +``` +This works everywhere. +```` + ````warn header="Pay attention to spaces" Usually we pay little attention to spaces. For us strings `subject:1-5` and `subject:1 - 5` are nearly identical.