en.javascript.info/10-regular-expressions-javascript/8-regexp-greedy-and-lazy/1-lazy-greedy/task.md
2015-03-19 17:20:12 +03:00

13 lines
355 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Совпадение для /d+? d+/
Мы разобрали совпадение:
```js
"123 456".match(/\d+ \d+?/g) ); // 123 4
```
А что будет, если сначала поставить ленивый, а потом жадный квантификаторы?
```js
"123 456".match(/\d+? \d+/g) ); // какой результат?
```