How can I get ['999'] out of this string? '451999277'? I only want repetitions of the same character.
This is what I've tried:
'451999277'.match(/(\d{3})/g) // === ["451", "999", "277"]
'451999277'.match(/(\d){3}/g) // === ["451", "999", "277"]
'451999277'.match(/([0-9]){3}/g) // === ["451", "999", "277"]
'451999277'.match(/(\d)\1{3}/g) // === null
.......
[EDIT]
solution:
'451999277'.match(/(\d)\1{2}/g) // === ['999']