Разделить строку на подстроки по символу

Есть строка, содержащая "теги":

const str = '#first#second';

Как можно с помощью регулярных выражений разделить её на подстроки first и second?

Вот как у меня получилось без помощи regexp:

const str = '#first#second'
const strMod = str.split('#');
strMod.shift();

console.log(strMod);


Ответы (3 шт):

Автор решения: Qwertiy

const str = '#first#second'
const parts = str.match(/[^#]+/g) || [];
console.log(parts);

→ Ссылка
Автор решения: entithat

const str = '#first#second';
console.log(str.match(/[^#]+/g));

→ Ссылка
Автор решения: Qwertiy

const str = '#first#second'
const parts = str.split('#').filter(Boolean)
console.log(parts)

→ Ссылка