en.javascript.info/9-regular-expressions/08-regexp-greedy-and-lazy/1-lazy-greedy/solution.md
2019-04-02 14:01:44 +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.