Skip to content

Instantly share code, notes, and snippets.

@scbedd
Created April 11, 2019 22:52
Show Gist options
  • Save scbedd/58baacd3c300d30429858a8bcfbcb250 to your computer and use it in GitHub Desktop.
Save scbedd/58baacd3c300d30429858a8bcfbcb250 to your computer and use it in GitHub Desktop.
Helpful Regex

Match a release note

(?<releaseNote>\#\s(?<releaseDate>[\-0-9]+)\s-\s(?<version>(\d+)(\.(\d+))?(\.(\d+))?(([^0-9][^\s]+)))(?<releaseText>((?!\s# )[\s\S])*))

Where the form this matches is

# <random text> <version specifier>
<release note content

# <version specifier older>
<release note content>

Each of the markdown headers will be seen as an individual release note, with matching groups that catch the date, the version, and the text under the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment