I think index must be an int? therefore pattern should be \d+ not .+