added use documentation.
Renamed lastIndex to lastindex.
Merge pull request #28 from arb/documentation

Documentation