Fix empty project name in .project and target in properties.project.

Solution: StringRegExp returns an array that's why the first element of the array is used.