Regular expression pattern matching for number,alphabetcic blocks
javascript, jquery, pattern-matching, regex
Solution
var str = 'aa11b2s';
console.log(str.replace(/([\d.]+)/g, ' $1 ').replace(/^ +| +$/g, ''));
Problem
Im having some strings like these ``` aa11b2s abc1sff3 a1b1sdd2 ``` etc.... i need to change these strings to these ``` aa 11 b 2 s abc 1 sff 3 a 1 b 1 sdd 2 ``` Simply saying..i need to add a space between each(number/alphabetic s) blocks