2
배열에서 확장되지 않은 JavaScript 파일을 필터링하는 정규식을 작성하려고합니다.정규식이 아닌 파일을 필터링하는 Regex
현재는 다음과 같은 표현은 작동합니다
array_filter($paths, function($path) {
return preg_match('@\[email protected]', $path) && !preg_match('@\.min\[email protected]', $path);
});
을 그러나, 나는 하나의 정규 표현식으로 이것을 쓰고 싶다 :
이preg_grep('SOME_REGEX_HERE', $paths);