From e30d9d4678f6308fa89e83064c9b138f695afe82 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Thu, 25 Apr 2019 21:37:14 +0200 Subject: [PATCH] minor --- 9-regular-expressions/02-regexp-methods/article.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/9-regular-expressions/02-regexp-methods/article.md b/9-regular-expressions/02-regexp-methods/article.md index 1472bc8e..28049353 100644 --- a/9-regular-expressions/02-regexp-methods/article.md +++ b/9-regular-expressions/02-regexp-methods/article.md @@ -46,7 +46,7 @@ alert( str.search( *!*/a/i*/!* ) ); // 0 (first match at zero position) **The important limitation: `search` only finds the first match.** -We can't find next positions using `search`, there's just no syntax for that. But there are other methods that can. +We can't find next matches using `search`, there's just no syntax for that. But there are other methods that can. ## str.match(reg), no "g" flag @@ -215,9 +215,9 @@ alert('12-34-56'.split(/-/)) // array of [12, 34, 56] ## str.replace(str|reg, str|func) -That's actually a great method, one of most useful ones. The swiss army knife for searching and replacing. +This is a generic method for searching and replacing, one of most useful ones. The swiss army knife for searching and replacing. -The simplest use -- searching and replacing a substring, like this: +We can use it without regexps, to search and replace a substring: ```js run // replace a dash by a colon