Derse geri dön
Bu materyal sadece English, Español, Français, Italiano, 日本語, Русский, Українська, 简体中文 dillerinde mevcuttur. Lütfen Türkçe diline çevirmek için bize yardım edin.

A match for /d+? d+?/

What’s the match here?

"123 456".match(/\d+? \d+?/g) ); // ?

The result is: 123 4.

First the lazy \d+? tries to take as little digits as it can, but it has to reach the space, so it takes 123.

Then the second \d+? takes only one digit, because that’s enough.