GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing javascript.info — A match for /d+? d+?/

  • Tutorial
  • Regular expressions
  • Greedy and lazy quantifiers
back to the lesson

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.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.