diff --git a/9-regular-expressions/17-regexp-methods/article.md b/9-regular-expressions/17-regexp-methods/article.md index ef578020d6..b6671d6627 100644 --- a/9-regular-expressions/17-regexp-methods/article.md +++ b/9-regular-expressions/17-regexp-methods/article.md @@ -95,13 +95,19 @@ Splits the string using the regexp (or a substring) as a delimiter. We can use `split` with strings, like this: ```js run -alert('12-34-56'.split('-')) // array of [12, 34, 56] +alert('12-34-56'.split('-')) // array of ['12', '34', '56'] ``` But we can split by a regular expression, the same way: ```js run -alert('12, 34, 56'.split(/,\s*/)) // array of [12, 34, 56] +alert('12, 34, 56'.split(/,\s*/)) // array of ['12', '34', '56'] +``` + +Also we can use `limit` to limit output, like this: + +```js run +alert('12-34-56'.split('-', 2)) // array of ['12', '34'] ``` ## str.search(regexp)