Trying to use Regex to extract the repository name and pull request number from a url.
const paragraph = 'https://github.com/johndoe/awesome-repo/pull/12';
const regex = /https:\/\/github.com\/johndoe\/([a-zA-Z]+-[a-zA-Z]+)\/pull\/(\d+)/gm;
const found = paragraph.match(regex);
console.log(found);
// expected output: Array ["awesome-repo", "12"]
But the response is just the entire url > Array ["https://github.com/johndoe/awesome-repo/pull/12"]
Any help would be appreciated