Skip to content

Instantly share code, notes, and snippets.

@nicdoye
Created January 18, 2017 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicdoye/c7a9f2c01fe1b51bc59d1090d89ede4c to your computer and use it in GitHub Desktop.
Save nicdoye/c7a9f2c01fe1b51bc59d1090d89ede4c to your computer and use it in GitHub Desktop.
Replace JIRA project-numbers with Markdown Links in VS Code/regex

Replace JIRA Project numbers with links

Assuming

  1. your project prefix is EXAMPLE
  2. your JIRA installation is at https://example.com/jira then regex to match is
(EXAMPLE-(\d)*)

if you want to match all text that looks like a JIRA, and not hardcode EXAMPLE, then you can use

([A-Z]*-(\d)*)

then the replacement is

[$1](https://example.com/jira/browse/$1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment