optional leading slash in regex to match root metadata, closes #504