When the String.match() method is used, it returns an array as a result. If the match used a pattern that made only a single match (i.e. the g attribute was not used) then the array returned will have this additional index property.
The index property will contain the character location within the original string where the match occurred.
See also: | Array.input, RegExp.exec(), String.match() |
Prev | Home | Next |
Array.constructor | Up | Array.input |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |