Jump to Categories

Regex

Until hit a number

var str = 'aaaaa-bbb-z-y-x-123[abxyz]';

// aaaaa-bbb-z-y-x-
var name = /[^0-9]*/g.exec(str);

Refs

RegExr