Maciek Sitkowski
Maciek's Blog

Maciek's Blog

Follow

How to split string to strings of equal length in JavaScript?

Dec 10, 20221 min read

Solution 'abcdabcdabcdabcdabcd'.match(/.{1,4}/g) // ['abcd', 'abcd', 'abcd', 'abcd', 'abcd'] Here's original StackOverflow answer. Context In...

How to split string to strings of equal length in JavaScript?
Advent of Code - preparing input data
Improve your problem solving skills with Advent of Code
How to add overlay color to <img />
How to query image dimensions from Sanity?
How to find all active GitHub Codespaces?