rq60
01-05-2003, 05:31 PM
I know if you have a string like $s = "43 23 34 54" and you want to loop through the sets you could do for split / /, $s.
But I've always been curious if there is a way to do it so that if the string was not seperated and looked like this $s = "43233454" to just have it loop through and each time grab the next 2 characters with regular expressions, or maybe some other method.
But I've always been curious if there is a way to do it so that if the string was not seperated and looked like this $s = "43233454" to just have it loop through and each time grab the next 2 characters with regular expressions, or maybe some other method.