“js regex find” Ответ

js string to regex

const regex = new RegExp('https:\\/\\/\\w*\\.\\w*.*', 'g');
garzj

JS Array Find Regex

const array = ["page=4", "sortOrder=asc", "datePosted=all-time", "sortOrder=desc"];
const match = array.find(value => /^sortOrder=/.test(value));
// match = "sortOrder=asc"
Unusual Unicorn

JS соответствует любой строке номера

const match = 'some/path/123'.match(/\/(\d+)/)
const id = match[1] // '123'
foloinfo

js regex find

yourString.match(RegExp(/YOUR REGEX/))
Happy Hippopotamus

Ответы похожие на “js regex find”

Вопросы похожие на “js regex find”

Больше похожих ответов на “js regex find” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования