This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = 'http://localhost:8081/api/v2/deliverable_builds/6db57828-01b5-11e8-a40f-685b358e6aa5' | |
var idExtractor = /([\d\w\-]+)$/g; | |
var idMatch = idExtractor.exec(url); | |
console.log(idMatch[1]); | |
var typeExtractor = /\/([\w\d\_]+)\/[\d\w\-]+$/g; | |
var typeMatch = typeExtractor.exec(url); | |
console.log(typeMatch[1]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment