en.javascript.info/5-regular-expressions/08-regexp-greedy-and-lazy/1-lazy-greedy/solution.md
Ilya Kantor 455d300d8d renames
2017-05-25 11:56:32 +03:00

6 lines
230 B
Markdown

The result is: `match:123 4`.
First the lazy `pattern:\d+?` tries to take as little digits as it can, but it has to reach the space, so it takes `match:123`.
Then the second `\d+?` takes only one digit, because that's enough.