Skip to content

Instantly share code, notes, and snippets.

@JakubTesarek
Created April 18, 2018 09:47
Show Gist options
  • Save JakubTesarek/b7c32751c60887a08f7a7e144d9a4d0f to your computer and use it in GitHub Desktop.
Save JakubTesarek/b7c32751c60887a08f7a7e144d9a4d0f to your computer and use it in GitHub Desktop.
import re
summary = '[application-package-1.234] bug fixed'
res = re.match('\[(?P<pkg>(?P<pkg_name>[a-zA-Z\-]+)-(?P<pkg_ver>[0-9](\.[\.0-9]+)?))\] ?(?P<desc>.+)', summary)
print res.groupdict()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment