tweaked regex to allow for the spaces after the end of projects
a few other fixes