<?php
$string = "this.is.a.test.to.see.how.preg_split.can.be.used.for.this";
var_export(
preg_split(
'/\.[^.]*\K\./',
$string,
0,
PREG_SPLIT_NO_EMPTY
)
);
- Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- array (
0 => 'this.is',
1 => 'a.test',
2 => 'to.see',
3 => 'how.preg_split',
4 => 'can.be',
5 => 'used.for',
6 => 'this',
)
preferences:
78.01 ms | 402 KiB | 91 Q