Using regular expression howto obtain all combination of 2 characters on a string?
Example: "abcdefghi", Result: ab,bc,cd,de,ef Using 3 chars: abc,bcd,cde,def...
I try with: /.{2}/g
but is not recursive, only match ab,cd,ef but not bc,de, etc.
Howto make this?