variation of string.split w/o delimiters?
Posted: Mon Sep 09, 2013 5:45 pm
Hello
I would like to split a line into parts that are 2 characters long each. There is no delimiter in between these parts though. So something like
xxyyzz
I want to capture xx, yy, and zz...
It may be possible for me to create an echo from the line that adds delimiters and capture from that instead, but I am avoiding this as it may affect other functionality in my script and I'm hoping there is a more simple way to extract what I need.
Any suggestions?
I would like to split a line into parts that are 2 characters long each. There is no delimiter in between these parts though. So something like
xxyyzz
I want to capture xx, yy, and zz...
It may be possible for me to create an echo from the line that adds delimiters and capture from that instead, but I am avoiding this as it may affect other functionality in my script and I'm hoping there is a more simple way to extract what I need.
Any suggestions?