3
preg_split('#(?=.)(?<=.)#u','asfaaasfdf');
字符串爲固定大小的塊產生:劈裂僅使用正則表達式
Array
(
[0] => a
[1] => s
[2] => f
[3] => a
[4] => a
[5] => a
[6] => s
[7] => f
[8] => d
[9] => f
)
我怎麼只能改變正則表達式,並得到:
Array
(
[0] => as
[1] => fa
[2] => aa
[3] => sf
[4] => df
)
或:
Array
(
[0] => asf
[1] => aaa
[2] => sfd
[3] => f
)