var str = 'naver.com/id' str.match(/\/([^\/]+)\/?$/)[1]; // id
var numberPattern = /\d+/g; 'something102asdfkj1948948'.match(numberPattern);
Last updated 6 years ago