Resort to regex if given index is not a number