$str = "[3979][3980][3981]";
preg_match_all("/(\D+)(\d+)/", $str, $matches);
print_r($matches);

/* result
Array
(
    [0] => Array
        (
            [0] => [3979
            [1] => ][3980
            [2] => ][3981
        )

    [1] => Array
        (
            [0] => [
            [1] => ][
            [2] => ][
        )

    [2] => Array
        (
            [0] => 3979
            [1] => 3980
            [2] => 3981
        )

)
*/

댓글 0