String js para regex
const regex = new RegExp('https:\\/\\/\\w*\\.\\w*.*', 'g');
garzj
const regex = new RegExp('https:\\/\\/\\w*\\.\\w*.*', 'g');
const array = ["page=4", "sortOrder=asc", "datePosted=all-time", "sortOrder=desc"];
const match = array.find(value => /^sortOrder=/.test(value));
// match = "sortOrder=asc"
const match = 'some/path/123'.match(/\/(\d+)/)
const id = match[1] // '123'
yourString.match(RegExp(/YOUR REGEX/))