Whoops. The last example on the page "Regular Expression Classes" is incorrect. The length and index fields are reversed, making the example output quite confusing. Note that in the input string there is a "Capture at position 2 for 6 characters", not the other way around as is shown in the example.