Update metadata regular expression parsing

Updates the regular expressions in `lib/generate-meta.js` to "match everything until", instead of "match everything except". This resolves issues with using asterisks inside metadata.

@StuCox I noticed you worked around the issue in 9dad6bb4, but I believe the issue also affects the documentation meta. This might be a better solution.