[Solved] split string with number using jquery [closed]

[ad_1]

You could split by whitespace if exists and take a positive lookahead for number/s and closing parenthesis.

var string =  "1)test one 2)test two 3)test three 4)test four 5)test five";

console.log(string.split(/\s*(?=\d+\))/));

0

[ad_2]

solved split string with number using jquery [closed]