Regular Expression pattern

For that to work, you need to do some grouping with () in your regexp.

/(\s\d)+/ will get you any sequence of digits and spaces.

/(\s\d+)+/ will get you any number of sequences of a space followed by
any number of digits.