JSFiddle - React, Tailwind, and code Playground
JavaScript
var pathPattern = new RegExp('/apps\/[0-9]+\/themes\/');
var href = 'http://www.fliplet.com/apps/123/themes/1234.css';
console.log(pathPattern.test(href));
var pathPattern = new RegExp('/apps\/[0-9]+\/themes\/');
var href = 'http://www.fliplet.com/apps/123/themes/1234.css';
console.log(pathPattern.test(href));