Programming/PHP
[정규표현식]문자열에서 숫자만 추출하기
$str = "[3979][3980][3981]";preg_match_all("/(\D+)(\d+)/", $str, $matches);print_r($matches);/* resultArray( [0] => Array ( [0] => [3979 [1] => ][3980 [2] => ][3981 ) [1] => Array ( [0] => [ [1] => ][ [2] => ][ ) [2] => Array ( [0] => 3979 [1] => 3980 [2]..
2020. 5. 28. 11:54