extractPkgName function

Extract info from package character strings