این محتوا تنها در این زبانها موجود است: English, Español, Français, Italiano, 日本語, Русский, Українська, 简体中文. لطفاً به ما
A match for /d+? d+?/
What’s the match here?
alert( "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.