Adrian
path.match(%r{.*/([^/]+)/manifests/(.+)$})
#<MatchData "<codedir>environments/production/modules/<foo>/manifests/init.pp" 1:"<foo>" 2:"init.pp">
nil