I am wondering if it is possible to use regex to split/replace a string and pad the matches with following n characters?
For example, my use case would be to parse strings in window-slide esque way:
with n = 3
"abcdef".split("..")
becomes
["abc", "bcd", "cde", "def"]
or in the case of replace,
"abcdef".replace("..")
becomes
"abcbcdcdedef"
Is there any way to implement this?
Thanks!